Changeset 2375 in MondoRescue
- Timestamp:
- Sep 9, 2009, 12:00:56 PM (16 years ago)
- Location:
- branches/2.2.10/mondo/src/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2370 r2375 2241 2241 2242 2242 #ifdef __FreeBSD__ 2243 mr_asprintf(output, call_program_and_get_last_line_of_output("mount | grep \" on / \"| cut -d' ' -f1"));2243 mr_asprintf(output, "%s", call_program_and_get_last_line_of_output("mount | grep ' on / ' | cut -d' ' -f1")); 2244 2244 #else 2245 mr_asprintf(output, call_program_and_get_last_line_of_output("mount | grep \" on / \" | cut -d' ' -f1 | sed s/[0-9]// | sed s/[0-9]//"));2245 mr_asprintf(output, "%s", call_program_and_get_last_line_of_output("mount | grep ' on / ' | cut -d' ' -f1 | sed 's/[0-9]//' | sed 's/[0-9]//'")); 2246 2246 if (strstr(output, "/dev/cciss/")) { 2247 2247 mr_free(output); 2248 mr_asprintf(output, call_program_and_get_last_line_of_output("mount | grep \" on / \"| cut -d' ' -f1 | cut -dp -f1"));2248 mr_asprintf(output, "%s", call_program_and_get_last_line_of_output("mount | grep ' on / ' | cut -d' ' -f1 | cut -dp -f1")); 2249 2249 } 2250 2250 if (strstr(output, "/dev/md")) { 2251 2251 mr_free(output); 2252 mr_asprintf(output, call_program_and_get_last_line_of_output("mount | grep \" on / \"| cut -d' ' -f1"));2252 mr_asprintf(output, "%s", call_program_and_get_last_line_of_output("mount | grep ' on / ' | cut -d' ' -f1")); 2253 2253 } 2254 2254 #endif -
branches/2.2.10/mondo/src/common/libmondo-fork.c
r2357 r2375 52 52 for (mr_getline(tmp, fin); !feof(fin); mr_getline(tmp, fin)) { 53 53 if (strlen(tmp) > 1) { 54 strncpy(result, 511, tmp);54 strncpy(result, tmp, 511); 55 55 } 56 56 mr_free(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.