From: Nikos Chantziaras <realnc@arcor.de>
To: Brian McGrew <brian@visionpro.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: (un)mount ramfs from C code
Date: Tue, 22 Sep 2009 20:13:42 +0300 [thread overview]
Message-ID: <4AB905C6.2040605@arcor.de> (raw)
In-Reply-To: <C6DE438F.127DA%brian@visionpro.com>
On 09/22/2009 07:04 PM, Brian McGrew wrote:
> Good morning all!
>
> So I'm using a ramfs for temporary files, thank you whoever designed that,
> it works great!
>
> I can mkdir, mount, chmoud, readand write and then umount the thing from the
> command line just fine.
>
> What I need now is some method from within my C/C++ code to determine if the
> ramfs is mounted, if not, then mount it so I can use it and unmount it when
> I'm done, without making a system call.
>
> Can this be done? Is there any access to mount/unmount from C/C++?
I suppose looking at the source code of the 'mount' utility could prove
very enlightening. You can find it at:
http://www.kernel.org/pub/linux/utils/util-linux-ng
next prev parent reply other threads:[~2009-09-22 17:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 16:04 (un)mount ramfs from C code Brian McGrew
2009-09-22 16:26 ` Luciano Rocha
2009-09-22 19:30 ` Brian McGrew
2009-09-22 19:53 ` Tim Walberg
2009-09-22 17:13 ` Nikos Chantziaras [this message]
2009-09-22 17:18 ` Nikos Chantziaras
2009-09-22 17:28 ` Matthias Schniedermeyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AB905C6.2040605@arcor.de \
--to=realnc@arcor.de \
--cc=brian@visionpro.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox