Changeset 2370 in MondoRescue
- Timestamp:
- Sep 7, 2009, 6:56:40 PM (15 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
r2364 r2370 1732 1732 if (bkpinfo->restore_data) { 1733 1733 mr_asprintf(tmp, "mount -t nfs -o nolock,ro %s %s", bkpinfo->nfs_mount, bkpinfo->isodir); 1734 else {1734 } else { 1735 1735 mr_asprintf(tmp, "mount -t nfs -o nolock %s %s", bkpinfo->nfs_mount, bkpinfo->isodir); 1736 1736 } -
branches/2.2.10/mondo/src/common/libmondo-filelist.c
r2366 r2370 1273 1273 */ 1274 1274 long g_skeleton_entries = 0; 1275 1276 1277 /** 1278 * Get the next entry in the space-separated list in @p incoming. 1279 * So if @p incoming was '"one and two" three four', we would 1280 * return "one and two". 1281 * @param incoming The list to get the next entry from. 1282 * @return The first item in the list (respecting double quotes). 1283 * @note The returned string points to static data that will be overwritten with each call. 1284 */ 1285 char *next_entry(char *incoming) 1286 { 1287 char *sz_res; 1288 char *p; 1289 bool in_quotes = FALSE; 1290 1291 mr_asprintf(sz_res, "%s", incoming); 1292 p = sz_res; 1293 while ((*p != ' ' || in_quotes) && *p != '\0') { 1294 if (*p == '\"') { 1295 in_quotes = !in_quotes; 1296 } 1297 p++; 1298 } 1299 *p = '\0'; 1300 return (sz_res); 1301 } 1302 1275 1303 1276 1304 … … 1648 1676 1649 1677 /** 1650 * Get the next entry in the space-separated list in @p incoming.1651 * So if @p incoming was '"one and two" three four', we would1652 * return "one and two".1653 * @param incoming The list to get the next entry from.1654 * @return The first item in the list (respecting double quotes).1655 * @note The returned string points to static data that will be overwritten with each call.1656 */1657 char *next_entry(char *incoming)1658 {1659 char *sz_res;1660 char *p;1661 bool in_quotes = FALSE;1662 1663 mr_asprintf(sz_res, "%s", incoming);1664 p = sz_res;1665 while ((*p != ' ' || in_quotes) && *p != '\0') {1666 if (*p == '\"') {1667 in_quotes = !in_quotes;1668 }1669 p++;1670 }1671 *p = '\0';1672 return (sz_res);1673 }1674 1675 1676 1677 /**1678 1678 * Locate the string @p string_to_find in the tree rooted at @p startnode. 1679 1679 * @param startnode The node containing the root of the directory tree.
Note:
See TracChangeset
for help on using the changeset viewer.