Plan 9 from Bell Labs’s /usr/web/sources/contrib/akumar/cmd/l/9usbfs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

if(! ~ $1 '')
	9udisk=/dev/sdU$1
if not{
	ls /dev/sdU* >[2] /dev/null ||
		{mount -a /srv/usb /dev && ls /dev/sdU* }
	exit 'no USB disk id specified'
}

if(test -d $9udisk){
	parts=/n/9u$1
	disk/partfs -m $parts -s 9u$1 $9udisk
	disk/fdisk -p $parts/sdXX/data > $parts/sdXX/ctl
#	if(test -f $parts/sdXX/plan9)
#		disk/prep -p $parts/sdXX/plan9 > $parts/sdXX/ctl
	mount -a /srv/9u$1 /dev
	ls $parts/sdXX
}
if not{
	echo 'no such USB disk'
	exit 'no such USB disk'
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].