Commit 69618b7a authored by Mike Hibler's avatar Mike Hibler
Browse files

Tweaks to "force a BSD filesystem" option (-b).

parent 11c03801
......@@ -113,11 +113,11 @@ read_bsdslice(int slice, int bsdtype, u_int32_t start, u_int32_t size,
* memory or vnode disk. We cons up a disklabel
* and let it rip.
*/
if (size == 0) {
if (slice == -1) {
fprintf(stderr, "P%d: WARNING: No disklabel, "
"assuming single partition\n", slice+1);
dlabel.label.d_partitions[0].p_offset = 0;
dlabel.label.d_partitions[0].p_size = 0;
dlabel.label.d_partitions[0].p_size = size;
dlabel.label.d_partitions[0].p_fstype = FS_BSDFFS;
return read_bsdpartition(infd, &dlabel.label, 0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment