The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
mount -o llock -F nfs vs mount -F nfs KhawHL UNIX for Dummies Questions & Answers 1 01-15-2008 09:48 PM
how i prepare a c++ code(c code) for implementing my own protocol format amitpansuria High Level Programming 1 09-06-2007 08:09 PM
SSH key code versus server key code Texan Security 1 04-12-2006 08:57 AM
how does unix identify C and other language code! a25khan UNIX for Dummies Questions & Answers 2 01-21-2004 07:44 AM
how to mount a hotswap scsi drive on a solaris 2.6 netra box using the mount command? soulshaker UNIX for Dummies Questions & Answers 4 07-18-2001 10:11 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 03-23-2006
Registered User
 

Join Date: Jul 2005
Posts: 11
HI All:
i am back and find the way to use that,
as following is my code but not all
may be you can try it.

#include <sys/param.h>
#include <sys/mount.h>
#include <errno.h>
#include <string.h>
#include <sys/uio.h>
int main()
{
const char cTestPrag[]="/data/test/Test";
int flag;
mount(need to be mounted,"point mount path,flag,"MNT_RDONLY");

//varible flag you can omit but you will get a waring "have no catch ......"

printf("%s",strerror(errno));
return 0;
}

i think use system() to execute mount. maybe use shell than c.
the unix 95 % use c code to write if you want to be a expert onto
c that i think it is necessary.

thanks All
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0