Re: [PATCH 5/5] xfs_fsr: convert fsrallfs to use time_t instead of int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 16, 2024 at 11:39:14AM -0500, Eric Sandeen wrote:
> >> +fsrallfs(char *mtab, time_t howlong, char *leftofffile)
> > 
> > Do you have to convert the printf format specifier too?
> 
> Hm, yeah. Another approach might be to just change "howlong"
> to an int and reject run requests of more than 24855 days. ;)

That feels easier.  Especially when you have to deal with format
specifiers of ny kind sticking to "simple" types makes life way
easier.

> 
> *shrug* either way.
> 
> > Also what happens if there's a parsing error and atoi() fails?  Right
> > now it looks like -t garbage gets you a zero run-time instead of a cli
> > parsing complaint?
> 
> That seems like a buglet, but unrelated to the issue at hand, right?
> So another patch, perhaps (using strtoul instead of atoi which can't
> actually fail and just returns 0, if I remember correctly.)

Yeah, getting rid of atoi is always a good thing.

---end quoted text---




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux