$ man 2 mount #include <sys/mount.h> int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data); int umount(const char *target); int umount2(const char *target, int flags); |
mount의 형태는 저따구인데.. 알흠답지 못하다...
아무튼 cifs를 마운트 하기 위해서는 "-o user=userid,password=userpw" 라는 옵션이 들어가는데
mount() 함수에서 사용하려니.... 오잉? 가변인자가 아니다 ㄱ-
몇번 실험해보니
"-o"를 제외하고 나머지 값을 data에 넘겨주면 된다.
$ mount -t cifs -o user=userid,password=userpw \\serverip\share /mnt/samba
는
mount("\\serverip\share", "/mnt/samba", "cifs", 0, "user=userid,password=userpw");
로 대치하여 사용하면 된다.
[링크 : http://linux.die.net/man/2/mount]
'Linux' 카테고리의 다른 글
tree (0) | 2009.11.16 |
---|---|
설치하지 않은 rpm에 포함된 파일의 내용 보기 (0) | 2009.11.04 |
mount() 이용하기 - mount cifs using mount() (2) | 2009.10.22 |
iperf - 대역폭 측정 (0) | 2009.10.22 |
execl()로 mount 실행하기 - samba (2) | 2009.10.14 |
gnash - GNU SWF player (0) | 2009.09.23 |
댓글을 달아 주세요
감사합니다..~!
2014.05.19 14:24 [ ADDR : EDIT/ DEL : REPLY ]으헝.. 이런것도 제가 건드렸었군요 ㅋㅋ
2014.05.19 16:49 신고 [ ADDR : EDIT/ DEL ]잊혀져 있던글을 보게 해주셔서 감사합니다 ^^