Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/e2fsprogs/old_e2fsprogs/blkid/devname.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/e2fsprogs/old_e2fsprogs/blkid/devname.c
r1765 r2725 153 153 154 154 DBG(DEBUG_DEVNAME, printf("opening %s\n", lvm_device)); 155 if ((lvf = fopen (lvm_device, "r")) == NULL) {155 if ((lvf = fopen_for_read(lvm_device)) == NULL) { 156 156 DBG(DEBUG_DEVNAME, printf("%s: (%d) %s\n", lvm_device, errno, 157 157 strerror(errno))); … … 234 234 char device[110]; 235 235 236 procpt = fopen (PROC_EVMS_VOLUMES, "r");236 procpt = fopen_for_read(PROC_EVMS_VOLUMES); 237 237 if (!procpt) 238 238 return 0; 239 239 while (fgets(line, sizeof(line), procpt)) { 240 if (sscanf 240 if (sscanf(line, " %d %d %d %*s %*s %[^\n ]", 241 241 &ma, &mi, &sz, device) != 4) 242 242 continue; … … 259 259 FILE *proc; 260 260 char line[1024]; 261 char ptname0[128], ptname1[128], *ptname = 0;261 char ptname0[128], ptname1[128], *ptname = NULL; 262 262 char *ptnames[2]; 263 263 dev_t devs[2]; … … 274 274 275 275 if (cache->bic_flags & BLKID_BIC_FL_PROBED && 276 time( 0) - cache->bic_time < BLKID_PROBE_INTERVAL)276 time(NULL) - cache->bic_time < BLKID_PROBE_INTERVAL) 277 277 return 0; 278 278 … … 283 283 #endif 284 284 285 proc = fopen (PROC_PARTITIONS, "r");285 proc = fopen_for_read(PROC_PARTITIONS); 286 286 if (!proc) 287 287 return -BLKID_ERR_PROC; … … 336 336 fclose(proc); 337 337 338 cache->bic_time = time( 0);338 cache->bic_time = time(NULL); 339 339 cache->bic_flags |= BLKID_BIC_FL_PROBED; 340 340 blkid_flush_cache(cache);
Note:
See TracChangeset
for help on using the changeset viewer.