Page MenuHomeFreeBSD

New ufdformat(1) utility
Needs ReviewPublic

Authored by cy on Dec 4 2017, 5:20 AM.
Tags
None
Referenced Files
F81877967: D13356.diff
Mon, Nov 25, 12:32 PM
Unknown Object (File)
Mon, Nov 18, 8:31 AM
Unknown Object (File)
Fri, Nov 15, 1:09 PM
Unknown Object (File)
Mon, Nov 11, 7:19 PM
Unknown Object (File)
Mon, Nov 11, 12:43 PM
Unknown Object (File)
Mon, Nov 11, 7:38 AM
Unknown Object (File)
Fri, Nov 8, 11:00 AM
Unknown Object (File)
Apr 7 2024, 6:45 AM
Subscribers

Details

Reviewers
bms
imp
jhb
Group Reviewers
manpages
Summary

This new ufdformat(1) utility (originally written by bms@) performs a low level floppy disk format in a similar manner to fdformat(1) but using a USB floppy drive.

Test Plan

make tinderbox

Tested on a TEAC FD-05PUW 3000: pass.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 13316

Event Timeline

The command is actually 'ufdformat', not 'usbformat'.

Yes. It performs the same function as fdformat(1) except that it only performs a low level format floppy disks using USB floppy drives. To name it usbformat would imply it formats other umass devices, which it does not.

The point I'm making is the Phabricator review calls it "usbformat", NOT "ufdformat".
Both in the subject of the review, as well as the summary of the review.

cy retitled this revision from New usbformat(1) utility to New ufdformat(1) utility.Dec 4 2017, 2:39 PM
cy edited the summary of this revision. (Show Details)

Thanks for pointing that out (long day yesterday). Fixed.

camcontrol is the traditional location for this functionality, though that obscures things. And there's issues with the integration there, so here might not be bad. Some of the code belongs in libcam, however at the very least.
The manual section should be 8, not 1 (fdformat is bogusly located in section 1). Maybe this is too fine a point.
I tend to agree with the 'move to kernel / libcam comments'

usr.sbin/ufdformat/scsi_util.c
295–297

there should be a libcam function to do this already....

396–400

should be a libcam routine to do this already

We could move the functions and similar ones used by camcontrol(8) to libcam. What if I open a new revision first to do just that?

Re the volume 1 manpage, I was puzzling over why fdformat(1) was in volume 1 too. I will volume 8 and move this man page to volume 8 as well.

wblock added inline comments.
usr.sbin/ufdformat/ufdformat.1
46
can be given as the full path
48
(like
50
or as an short device name that is located in``
51

Remove this line.

53
(like
56
The options are:
62

Break the sentence here.

.Xr fdcontrol 8 .
63
The default is 1.44MB.
73
Do not ask for confirmation about formatting the floppy disk, but
79
flag has not been specified, ask the user for confirmation
81
To continue, an answer
89
To create
109

s/has been/is/

110

Don't need "finally".

113

s/will be/are/

118

Break the sentence:

1 is returned on any errors during floppy formatting.
An exit status
119
of 2 reflects invalid arguments given to the program, along with
120
appropriate information written to diagnostic output.
138

Ummm.... copy/paste error? ufdformat didn't appear in FreeBSD 6, unless I'm mistaken.