• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Drives mounting in C

   Hi
I need to access to CDROM from a my software but I do not want to exit to mount it from a command line. How can I mount a drive CDROM, floppy, ZIP, network drive .... from my source code in C ?
0
daanen
Asked:
daanen
  • 2
1 Solution
 
rbrCommented:
Check
man -S2 mount



include <sys/mount.h>


ret=mount ("/dev/yourdev","/mountpoint","fs",MS_READONLY,"");

printf("%d",ret);

fs is the filesystem ext2, msdos, ...

man -S2 mount
0
 
rbrCommented:
Check
man -S2 mount



include <sys/mount.h>


ret=mount ("/dev/yourdev","/mountpoint","fs",MS_READONLY,"");

printf("%d",ret);

fs is the filesystem ext2, msdos, ...

man -S2 mount
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now