Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706578
| From | Prarit Bhargava <prarit@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps |
| Date | 2017-08-08 15:50 +0200 |
| Message-ID | <ucd3t-De-23@gated-at.bofh.it> (permalink) |
| References | <ubSBI-291-27@gated-at.bofh.it> <uc0pB-7WI-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote:
> On (08/07/17 11:52), Prarit Bhargava wrote:
<snip>
> [..]
>> + if (strlen(param) == 1) {
>> + /* Preserve legacy boolean settings */
>> + if (!strcmp("0", param) || !strcmp("n", param) ||
>> + !strcmp("N", param))
>> + _printk_time = PRINTK_TIME_DISABLE;
>> + if (!strcmp("1", param) || !strcmp("y", param) ||
>> + !strcmp("Y", param))
>> + _printk_time = PRINTK_TIME_LOCAL;
>> + }
>> + if (_printk_time == -1) {
>> + for (stamp = 0; stamp <= 4; stamp++) {
>> + if (!strncmp(printk_time_str[stamp], param,
>> + strlen(param))) {
>> + _printk_time = stamp;
>> + break;
>> + }
>> + }
>> + }
>
> you can use match_string() here.
match_string doesn't match correctly. Others have made requests for, for
example, printk.time=r printk.time=real, etc. Instead of butchering the code
for a bunch of strings I chose to allow partial matching and simplify the code.
P.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-08-08 02:20 +0200 Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps Prarit Bhargava <prarit@redhat.com> - 2017-08-08 14:40 +0200 Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps Prarit Bhargava <prarit@redhat.com> - 2017-08-08 15:50 +0200
csiph-web