From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vultr.musolino.id.au ([45.76.123.158]) by ewsd; Thu Jun 4 09:58:04 EDT 2020 Received: from 101.103.128.181 ([101.103.128.181]) by vultr; Thu Jun 4 23:57:45 EST 2020 Message-ID: <976F3A6A48EC099DBF3B49F865DDDF9E@musolino.id.au> From: Alex Musolino Date: Thu, 4 Jun 2020 23:27:43 +0930 To: 9front@9front.org Subject: Re: [9front] -d option for fshalt In-Reply-To: <7AB11D189863A13031E8FD10D69FD355@a-b.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: RESTful strategy-based content-driven content-driven-aware rails > Seems like a reasonably useful option to have, though I'm inclined to > suggest a standalone dump [fscons ...] utility as an alternative that > one might conveniently use on its own, or combined with a halt: > > dump && fshalt Yeah, that's fair comment. Something like this: #!/bin/rc rfork E if(~ $#* 0){ c=`{ls /srv/cwfs*cmd >[2]/dev/null} h=`{ls /srv/hjfs*cmd >[2]/dev/null} } for (i in $* $c $h) echo dump >>$i Perhaps we call it fsdump to go with fshalt? > While I'd suggest perusing the new and improved getflags(8) to parse > the arguments the patch looks mostly good to me. > > Replace the -* while loop with: > > flagfmt = 'd:dump, r:reboot' > eval `''{aux/getflags $*} || exec aux/usage > > And change "yes / no" to "1 / 0" where appropriate. I did think about this but figured I'd do it separately (if at all) in the interest of keeping the patch small and focused. Anyway, might be moot now.