lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c62985530809290856w4045c3acx8779d8a11445a14a@mail.gmail.com>
Date:	Mon, 29 Sep 2008 17:56:50 +0200
From:	"Frédéric Weisbecker" <fweisbec@...il.com>
To:	"Pekka Paalanen" <pq@....fi>
Cc:	mingo@...e.hu, rostedt@...dmis.org, linux-kernel@...r.kernel.org
Subject: Re: [Path -tip 1/3] Tracing/ftrace: Change the type of the print_line callback

2008/9/29 Pekka Paalanen <pq@....fi>:
> On Mon, 29 Sep 2008 11:11:15 +0200
> "Frédéric Weisbecker" <fweisbec@...il.com> wrote:
>
>> 2008/9/28 Pekka Paalanen <pq@....fi>:
>>
>
> [static int print_trace_line(struct trace_iterator *iter)]
>
>> > Shouldn't the return type be bool?
>> > If it's not, reading this function makes me wonder about the conversion
>> > from enum to int, i.e. what is the meaning of the int.
>>
>> Actually it should be enum print_line_t. I forgot to change its type.
>> But we need to check its return value as an enum print_line_t.
>
> Is print_line_t necessary? Does it have to return any other information than
> "this entry was handled somehow" vs. "this entry must be handled later"?
> Currently it's just a flag to say "please flush and retry".


It would just make the code more readable in the read_pipe function.
if (sret == TRACE_TYPE_PARTIAL_LINE) tells us more than if (!sret).
And it would avoid some tests to return a boolean in print_trace_line.

No?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ