public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "Darrick J. Wong" <djwong@kernel.org>,
	Andrey Albershteyn <aalbersh@redhat.com>,
	cem@kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 5/5] xfs_fsr: convert fsrallfs to use time_t instead of int
Date: Tue, 16 Apr 2024 09:41:14 -0700	[thread overview]
Message-ID: <Zh6qKqdOC-U0749N@infradead.org> (raw)
In-Reply-To: <2269d1fa-670d-440c-9f37-1724c3b5aa4e@sandeen.net>

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---

      reply	other threads:[~2024-04-16 16:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 12:34 [PATCH 0/5] xfsprogs random fixes found by Coverity scan Andrey Albershteyn
2024-04-16 12:34 ` [PATCH 1/5] xfs_db: fix leak in flist_find_ftyp() Andrey Albershteyn
2024-04-16 16:07   ` Darrick J. Wong
2024-04-16 16:32   ` Christoph Hellwig
2024-04-16 12:34 ` [PATCH 2/5] xfs_repair: make duration take time_t Andrey Albershteyn
2024-04-16 16:12   ` Darrick J. Wong
2024-04-16 16:20     ` Andrey Albershteyn
2024-04-16 16:45   ` Christoph Hellwig
2024-04-16 12:34 ` [PATCH 3/5] xfs_io: init count to stop loop from execution Andrey Albershteyn
2024-04-16 16:15   ` Darrick J. Wong
2024-04-16 16:22     ` Andrey Albershteyn
2024-04-16 12:34 ` [PATCH 4/5] xfs_scrub: don't call phase_end if phase_rusage was not initialized Andrey Albershteyn
2024-04-16 16:18   ` Darrick J. Wong
2024-04-16 12:34 ` [PATCH 5/5] xfs_fsr: convert fsrallfs to use time_t instead of int Andrey Albershteyn
2024-04-16 16:21   ` Darrick J. Wong
2024-04-16 16:31     ` Andrey Albershteyn
2024-04-16 17:07       ` Darrick J. Wong
2024-04-16 16:39     ` Eric Sandeen
2024-04-16 16:41       ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zh6qKqdOC-U0749N@infradead.org \
    --to=hch@infradead.org \
    --cc=aalbersh@redhat.com \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox