code: plan9front

Download patch

ref: 4aee2b803e7f566f6ec1796fc45bfe0023d3762a
parent: 37156fb0b2a2f15614a34875c23892c6d9b95f90
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jun 28 17:50:30 EDT 2015

nusbrc: handle fat formated usb drives without partition table

on some usb drives, there is no dos partition table, so check
the filesystem type and consider the whole drive.

--- a/sys/src/9/boot/nusbrc
+++ b/sys/src/9/boot/nusbrc
@@ -39,7 +39,7 @@
 					devs=sdU^($1 $5)
 					for(dev in $devs $devs.*) if(test -d $dev) {
 						diskparts $dev
-						for(part in $dev/dos* $dev/9fat) if(test -r $part) {
+						for(part in $dev/dos* $dev/9fat* $dev/data) if(test -r $part && ~ `{fstype $part} dos) {
 							mkdir -m 0700 '#σc/'^$dev || exit
 							{dossrv -s -f $part &} <[0=1] |
 								echo 0 >'#σc/'^$dev/dos