Changeset 165 for branches/samba-3.0/source/client/umount.cifs.c
- Timestamp:
- Mar 11, 2009, 9:14:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/client/umount.cifs.c
r124 r165 35 35 #include <string.h> 36 36 #include <mntent.h> 37 #include "mount.h" 37 38 38 39 #define UNMOUNT_CIFS_VERSION_MAJOR "0" 39 #define UNMOUNT_CIFS_VERSION_MINOR " 5"40 #define UNMOUNT_CIFS_VERSION_MINOR "6" 40 41 41 42 #ifndef UNMOUNT_CIFS_VENDOR_SUFFIX … … 139 140 } 140 141 141 static int lock_mtab(void)142 {143 int rc;144 145 rc = mknod(MOUNTED_LOCK , 0600, 0);146 if(rc == -1)147 printf("\ngetting lock file %s failed with %s\n",MOUNTED_LOCK,148 strerror(errno));149 150 return rc;151 152 }153 154 static void unlock_mtab(void)155 {156 unlink(MOUNTED_LOCK);157 }158 159 142 static int remove_from_mtab(char * mountpoint) 160 143 { … … 170 153 /* Do we first need to check if it is writable? */ 171 154 155 atexit(unlock_mtab); 172 156 if (lock_mtab()) { 173 157 printf("Mount table locked\n");
Note:
See TracChangeset
for help on using the changeset viewer.