View | Details | Raw Unified | Return to bug 148881
Collapse All | Expand All

(-)src/lib/libdisk/open_disk.c (+7 lines)
Lines 160-165 Link Here
160
160
161
		}
161
		}
162
		t = strsep(&p, " ");	/* Type {SUN, BSD, MBR, PC98, GPT} */
162
		t = strsep(&p, " ");	/* Type {SUN, BSD, MBR, PC98, GPT} */
163
		/*
164
		 * Skip LABEL lines.  This solves parsing errors when it
165
		 * comes to disks which contain volume labels or glabels
166
		 * with spaces, such as FAT-formatted USB flash drives.
167
		 */
168
		if (!strcmp(t, "LABEL"))
169
			continue;
163
		n = strsep(&p, " ");	/* name */
170
		n = strsep(&p, " ");	/* name */
164
		a = strsep(&p, " ");	/* len */
171
		a = strsep(&p, " ");	/* len */
165
		len = strtoimax(a, &r, 0);
172
		len = strtoimax(a, &r, 0);

Return to bug 148881