util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: kerolasa@gmail.com
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 1/7] zramctl: print all devices as a default action
Date: Mon, 04 Aug 2014 03:31:13 -0400	[thread overview]
Message-ID: <1946062.6JF60ZCY1D@vapier> (raw)
In-Reply-To: <CAG27Bk2OosZoo=XAGy+2Ld-pxAbTzivhr=cXE4S8FJtVzPnwAA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

On Sun 03 Aug 2014 21:50:33 Sami Kerola wrote:
> On 3 August 2014 15:50, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Sun 03 Aug 2014 15:17:37 Sami Kerola wrote:
> >> -static int zram_used(struct zram *z)
> >> +static int zram_used(struct zram *z, int find_unused)
> > 
> > s/int/bool/ ?
> 
> There's only handful of boolean types in use in util-linux

i think there should be more.  i find them more readable, clearer intent, and 
harder to screw up.  whereas passing around 0/1 everywhere gets funky (and i 
think the code looks funky already).

> util-linux> git grep -l 'bool '
> lib/mbsalign.c
> login-utils/su-common.c
> sys-utils/hwclock-cmos.c
> sys-utils/hwclock.c
> sys-utils/nsenter.c
> tests/ts/login/logindefs
> 
> And question about bool is asked before.
> 
> http://marc.info/?l=util-linux-ng&m=135817763904699&w=2

it's a little hard to tell if it was meant generally or that specific case.  
but if Karel prefers they not be used, then the codebase should reflect that.

> The question was never answered, but if I should guess the idea in
> util-linux is same as what Linus said should be done in kernel.
> 
> https://lkml.org/lkml/2013/8/31/138
> 
> Please read the whole thread. It's full of good stuff.

i'm not really seeing anything applicable to us.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-08-04  7:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03 14:17 [PATCH 1/7] zramctl: print all devices as a default action Sami Kerola
2014-08-03 14:17 ` [PATCH 2/7] docs: add details to zramctl --size option documentation Sami Kerola
2014-08-03 14:17 ` [PATCH 3/7] zramctl: mark --reset mutually exclusive with --algorithm and --streams Sami Kerola
2014-08-03 14:17 ` [PATCH 4/7] zramctl: fail status printout when device does not exist Sami Kerola
2014-08-03 14:17 ` [PATCH 5/7] zramctl: improve error message Sami Kerola
2014-08-03 14:17 ` [PATCH 6/7] zramctl: fix mount point printout Sami Kerola
2014-08-04 12:15   ` Karel Zak
2014-08-05 23:03     ` Sami Kerola
2014-08-03 14:17 ` [PATCH 7/7] zramctl: add bash completion script Sami Kerola
2014-08-03 14:50 ` [PATCH 1/7] zramctl: print all devices as a default action Mike Frysinger
2014-08-03 20:50   ` Sami Kerola
2014-08-04  7:31     ` Mike Frysinger [this message]
2014-08-06  8:16       ` Karel Zak
2014-08-03 22:19 ` Bernhard Voelker
2014-08-04 12:02 ` Karel Zak
2014-08-05 22:38   ` Sami Kerola
2014-08-11 12:49 ` Karel Zak

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=1946062.6JF60ZCY1D@vapier \
    --to=vapier@gentoo.org \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).