Changeset 3509 in MondoRescue for branches/3.2/mondo/src/lib/mr_file.c
- Timestamp:
- Feb 13, 2016, 2:57:55 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/lib/mr_file.c
r1136 r3509 23 23 24 24 if ((fd = fopen(path, mode)) == NULL) { 25 mr_msg_int(1,line,file," Unable to open %s",path);25 mr_msg_int(1,line,file,"mr_fopen_int","Unable to open %s",path); 26 26 mr_exit(-1,"Exiting"); 27 27 } … … 34 34 35 35 if (fd == NULL) { 36 mr_msg_int(1,line,file," fd is NULL.\nShould NOT happen.");36 mr_msg_int(1,line,file,"mr_fprintf_int","fd is NULL.\nShould NOT happen."); 37 37 mr_exit(-1,"Exiting"); 38 38 } 39 39 va_start(args,fmt); 40 40 if (vfprintf(fd, fmt, args) < 0) { 41 mr_msg_int(1,line,file," Unable to print to fd");41 mr_msg_int(1,line,file,"mr_fprintf_int","Unable to print to fd"); 42 42 mr_exit(-1,"Exiting"); 43 43 } … … 48 48 49 49 if (fd == NULL) { 50 mr_msg_int(1,line,file," fd is NULL.\nShould NOT happen.");50 mr_msg_int(1,line,file,"mr_fclose_int","fd is NULL.\nShould NOT happen."); 51 51 mr_exit(-1,"Exiting"); 52 52 } 53 53 if (*fd == NULL) { 54 mr_msg_int(1,line,file," File descriptor is NULL.\nShould NOT happen.");54 mr_msg_int(1,line,file,"mr_fclose_int","File descriptor is NULL.\nShould NOT happen."); 55 55 mr_exit(-1,"Exiting"); 56 56 } 57 57 if (fclose(*fd) < 0) { 58 mr_msg_int(1,line,file," Unable to close File Descriptor");58 mr_msg_int(1,line,file,"mr_fclose_int","Unable to close File Descriptor"); 59 59 } 60 60 *fd = NULL; … … 64 64 65 65 if (mkdir(pathname,mode) != 0) { 66 mr_msg_int(1,line,file," Unable to create directory %s",pathname);66 mr_msg_int(1,line,file,"mr_mkdir_int","Unable to create directory %s",pathname); 67 67 mr_exit(-1,"Exiting"); 68 68 }
Note:
See TracChangeset
for help on using the changeset viewer.