Bug 73110

Summary: [patch] ffsinfo conversion from atol() to strtol()
Product: Base System Reporter: Giorgos Keramidas <keramida>
Component: binAssignee: Robert Watson <rwatson>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
ffsinfo.patch none

Description Giorgos Keramidas freebsd_committer freebsd_triage 2004-10-25 12:10:14 UTC
The ffsinfo utility uses atol() to parse numeric values out of optarg strings.
This isn't necessarily a bug, but it can be slightly inconvenient, because
atol() doesn't know how to parse hexadecimal or octal numbers and at least one
of the options of ffsinfo(8) would be easier to use if it did.

Changing atol() -> strtol() allows one to use hex masks for -l MASK, i.e.:

orion:/a/freebsd/src/sbin/ffsinfo# ./ffsinfo -l 0x3ff /

A word of caution: the source of ffsinfo.c does not follow style(9).  This is
why I used a style similar to the one of the original source in my diff.
Comment 1 Robert Watson freebsd_committer freebsd_triage 2005-01-03 18:58:09 UTC
State Changed
From-To: open->patched

Applied as ffsinfo.c:1.7 in FreeBSD CVS HEAD.  Will MFC after two weeks. 
Thanks! 



Comment 2 Robert Watson freebsd_committer freebsd_triage 2005-01-03 18:58:09 UTC
Responsible Changed
From-To: freebsd-bugs->rwatson

Grab ownership of this PR.
Comment 3 Robert Watson freebsd_committer freebsd_triage 2008-01-13 16:11:30 UTC
State Changed
From-To: patched->closed

Patch was applied.