Changeset 688 in MondoRescue for trunk/mondo/mondo/common/libmondo-raid.c
- Timestamp:
- Jul 17, 2006, 3:44:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-raid.c
r672 r688 774 774 { 775 775 int cnt = 0; 776 staticchar *argv[64];776 char *argv[64]; 777 777 char **ap; 778 char *line = (char *) malloc(MAX_STR_LEN); 779 if (!line) 780 errx(1, 781 "unable to allocate %i bytes of memory for `char *line' at %s:%i", 782 MAX_STR_LEN, __FILE__, __LINE__); 783 (void) fgets(line, MAX_STR_LEN, f); 778 char *line = NULL; 779 size_t = 0; 780 int lastpos = 0; 781 782 getline(&line, &n, f); 784 783 if (feof(f)) { 785 784 log_it("[GNVCL] Uh... I reached the EOF."); 786 return 0;787 } 788 789 for (ap = argv; (*ap = strsep(&line, " \t")) != NULL;)785 return NULL; 786 } 787 788 for (ap = argv; (*ap = mr_strtok(line, " \t", &lastpos)) != NULL;) 790 789 if (**ap != '\0') { 791 790 if (++ap >= &argv[64])
Note:
See TracChangeset
for help on using the changeset viewer.