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