From: Martin Dalecki <dalecki@evision-ventures.com>
To: Alexander Viro <viro@math.psu.edu>
Cc: jack@suse.cz, Linus Torvalds <torvalds@transmeta.com>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux-2.5.17
Date: Wed, 22 May 2002 15:07:50 +0200 [thread overview]
Message-ID: <3CEB9826.4070000@evision-ventures.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0205220801540.1068-100000@weyl.math.psu.edu>
Uz.ytkownik Alexander Viro napisa?:
>
> On Wed, 22 May 2002, Martin Dalecki wrote:
>
>
>>Or are are you going to reinvent just enother
>>case of /proc/ formatting compatibility problems?!
>>And the requirement to have /proc mounted for quoate usage?!
>>
>>I hate /proc/my/random/sandbox/becouse/I/dont/knwo/unix/and/have/no/taste
>>interfaces more and more...
>>
>>(PS. Hah! I found finally someone today who deserves flames! :-).)
>
>
> Gives the phrase "finding yourself" a whole new meaning, doesn't it?
>
> Al, deeply PO'd by assorted cretinisms _not_ related to the kernel.
> Sigh...
Lokking at 2.5.17 I see the following:
-#define QUOTAFILENAME "quota"
-#define QUOTAGROUP "staff"
As usuall we can see what goes to /proc is apparently
random bulls*it as always. I love in esp. the assumption about
some group name on a system!
But it get's removed this time. So let's peer where
it get's reintroduced:
Ah... yes, patch-2.5.17, here it is:
+#ifdef CONFIG_PROC_FS
+static int read_stats(char *buffer, char **start, off_t offset, int count, int
*eof, void *data)
+{
+
int len;
+
struct quota_format_type *actqf;
+
+
dqstats.allocated_dquots = nr_dquots;
+
dqstats.free_dquots = nr_free_dquots;
+
+
len = sprintf(buffer, "Version %u\n", __DQUOT_NUM_VERSION__);
+
len += sprintf(buffer + len, "Formats");
+
lock_kernel();
+
for (actqf = quota_formats; actqf; actqf = actqf->qf_next)
+
len += sprintf(buffer + len, " %u", actqf->qf_fmt_id);
unlock_kernel();
-
return ret;
+
len += sprintf(buffer + len, "\n%u %u %u %u %u %u %u %u\n",
+
dqstats.lookups, dqstats.drops,
+
dqstats.reads, dqstats.writes,
+
dqstats.cache_hits, dqstats.allocated_dquots,
+
dqstats.free_dquots, dqstats.syncs);
+
+
if (offset >= len) {
+
*start = buffer;
+
*eof = 1;
+
return 0;
+
}
+
*start = buffer + offset;
+
if ((len -= offset) > count)
+
return count;
+
*eof = 1;
+
+
return len;
+}
+#endif
What can we see in the above:
1. Those are first grade candidates for sysctl read-only entires, since they
are system global statistics which should belong to /proc/sys/fs/
We even have already fs.dquot-nr there! Why the hell don't put them
alongside?
2. Typical string formating and value copy and termination
problems inherent to string stuff...
3. The futile hope that tools using it will even bother to check the
Version... gtop just *right today* showed that user space programmers
won't care about it, so it gains us literally *nothing*.
If it where sysctl numbers they would just vanish beneath them if something
changed semantincally and they *would have no chance* to do it wrong.
next prev parent reply other threads:[~2002-05-22 14:11 UTC|newest]
Thread overview: 142+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-21 5:16 Linux-2.5.17 Linus Torvalds
2002-05-21 13:58 ` Linux-2.5.17 Roman Zippel
2002-05-21 16:06 ` Linux-2.5.17 Linus Torvalds
2002-05-21 18:36 ` Linux-2.5.17 Roman Zippel
2002-05-21 18:53 ` Linux-2.5.17 Linus Torvalds
2002-05-21 23:35 ` Linux-2.5.17 Roman Zippel
2002-05-22 0:10 ` Linux-2.5.17 Linus Torvalds
2002-05-22 0:31 ` Linux-2.5.17 Roman Zippel
2002-05-22 0:54 ` Linux-2.5.17 Linus Torvalds
2002-05-22 2:17 ` Linux-2.5.17 David S. Miller
2002-05-22 2:40 ` Linux-2.5.17 Linus Torvalds
2002-05-22 2:57 ` Linux-2.5.17 David S. Miller
2002-05-22 3:21 ` Linux-2.5.17 Linus Torvalds
2002-05-22 8:06 ` Linux-2.5.17 David Lang
2002-05-22 14:14 ` Linux-2.5.17 Dave McCracken
2002-05-22 16:10 ` Linux-2.5.17 Linus Torvalds
2002-05-22 13:45 ` Linux-2.5.17 Roman Zippel
2002-05-22 16:08 ` Linux-2.5.17 Linus Torvalds
2002-05-21 15:32 ` [PATCH] 2.5.17 IDE 65 Martin Dalecki
2002-05-21 16:59 ` Linus Torvalds
2002-05-21 16:35 ` Martin Dalecki
2002-05-21 17:56 ` Linus Torvalds
2002-05-21 18:49 ` Alan Cox
2002-05-21 20:08 ` Vojtech Pavlik
2002-05-21 23:28 ` Linus Torvalds
2002-05-22 6:53 ` Martin Dalecki
2002-05-23 7:01 ` Kai Henningsen
2002-05-22 7:16 ` [PATCH] 2.5.17 IDE 66 Martin Dalecki
2002-05-22 7:19 ` [PATCH] 2.5.17 IDE 67 Martin Dalecki
2002-05-22 17:13 ` Tom Rini
2002-05-22 16:21 ` Martin Dalecki
2002-05-22 17:31 ` Tom Rini
2002-05-22 16:40 ` Martin Dalecki
2002-05-22 18:47 ` Tom Rini
2002-05-23 6:08 ` Martin Dalecki
2002-05-23 15:26 ` Tom Rini
2002-05-23 14:32 ` Martin Dalecki
2002-05-23 15:40 ` Tom Rini
2002-05-22 7:23 ` [PATCH] 2.5.16 IDE 68 Martin Dalecki
2002-05-22 10:48 ` Juan Quintela
2002-05-22 9:45 ` Martin Dalecki
2002-05-22 15:55 ` Linus Torvalds
2002-05-22 15:03 ` Martin Dalecki
2002-05-22 9:05 ` [PATCH] 2.5.17 /dev/ports Martin Dalecki
2002-05-22 10:42 ` Paul Mackerras
2002-05-22 9:46 ` Martin Dalecki
2002-05-22 10:54 ` David S. Miller
2002-05-22 10:13 ` Martin Dalecki
2002-05-22 11:26 ` Russell King
2002-05-22 10:40 ` Martin Dalecki
2002-05-22 11:58 ` Richard B. Johnson
2002-05-22 12:36 ` Russell King
2002-05-22 13:23 ` Alan Cox
2002-05-22 12:31 ` Martin Dalecki
2002-05-22 12:44 ` Alan Cox
2002-05-22 12:32 ` Martin Dalecki
2002-05-22 15:05 ` Alan Cox
2002-05-22 13:05 ` Alan Cox
2002-05-22 12:38 ` Martin Dalecki
2002-05-22 15:04 ` Alan Cox
2002-05-22 13:53 ` Martin Dalecki
2002-05-22 15:03 ` Lars Marowsky-Bree
2002-05-22 15:07 ` Padraig Brady
2002-05-22 14:07 ` Martin Dalecki
2002-05-22 15:21 ` Dave Jones
2002-05-22 15:19 ` Dave Jones
2002-05-22 15:31 ` Alan Cox
2002-05-27 9:04 ` Pavel Machek
2002-05-22 14:54 ` Alexander Viro
2002-05-22 15:24 ` Alan Cox
2002-05-22 15:10 ` Alexander Viro
2002-07-22 12:20 ` Ruth Ivimey-Cook
2002-05-23 7:30 ` Rusty Russell
2002-05-23 6:44 ` Martin Dalecki
2002-05-23 8:26 ` Rusty Russell
2002-05-22 13:16 ` Padraig Brady
2002-05-22 12:30 ` Martin Dalecki
2002-05-22 13:50 ` Sebastian Droege
2002-05-22 13:52 ` Alan Cox
2002-05-22 13:49 ` Vojtech Pavlik
2002-05-22 12:51 ` Martin Dalecki
2002-05-22 13:56 ` Vojtech Pavlik
2002-05-22 14:58 ` Alan Cox
2002-05-22 13:49 ` Martin Dalecki
2002-05-22 14:42 ` Vojtech Pavlik
2002-05-22 13:59 ` Alexander Viro
2002-05-22 13:12 ` Martin Dalecki
2002-05-22 14:33 ` Alexander Viro
2002-05-22 13:40 ` Martin Dalecki
2002-05-22 13:16 ` Martin Dalecki
2002-05-22 14:34 ` Alexander Viro
2002-05-22 16:31 ` James Simmons
2002-05-22 14:12 ` Vojtech Pavlik
2002-05-27 9:07 ` Pavel Machek
2002-05-22 15:00 ` Alan Cox
2002-05-22 14:43 ` Vojtech Pavlik
2002-05-22 16:28 ` Linus Torvalds
2002-05-22 17:22 ` Alan Cox
2002-05-22 16:17 ` Martin Dalecki
2002-05-22 17:30 ` Russell King
2002-05-22 16:36 ` Martin Dalecki
2002-05-22 17:36 ` Alexander Viro
2002-05-22 17:46 ` Alan Cox
2002-05-26 13:53 ` Riley Williams
2002-05-26 15:28 ` Vojtech Pavlik
2002-05-26 15:39 ` Riley Williams
2002-05-23 10:10 ` Martin Diehl
2002-05-22 10:54 ` Linux-2.5.17 Martin Dalecki
2002-05-22 12:04 ` Linux-2.5.17 Alexander Viro
2002-05-22 13:07 ` Martin Dalecki [this message]
2002-05-22 14:38 ` Linux-2.5.17 Alexander Viro
2002-05-22 13:42 ` Linux-2.5.17 Martin Dalecki
2002-05-22 16:55 ` Linux-2.5.17 Jan Kara
2002-05-22 12:14 ` Linux-2.5.17 Russell King
2002-05-22 12:36 ` Linux-2.5.17 Martin Dalecki
2002-05-22 16:02 ` Linux-2.5.17 Linus Torvalds
2002-05-22 15:04 ` Linux-2.5.17 Martin Dalecki
2002-05-22 16:58 ` Linux-2.5.17 Jan Kara
2002-05-22 16:08 ` Linux-2.5.17 Martin Dalecki
2002-05-22 17:56 ` Linux-2.5.17 Jan Kara
2002-05-22 16:56 ` Linux-2.5.17 Martin Dalecki
2002-05-22 18:17 ` Linux-2.5.17 Jan Kara
2002-05-22 18:36 ` Linux-2.5.17 Russell King
2002-05-22 13:06 ` Linux-2.5.17 Alan Cox
2002-05-22 11:19 ` Linux-2.5.17 Russell King
2002-05-22 11:27 ` Linux-2.5.17 David S. Miller
2002-05-22 16:23 ` Linux-2.5.17 Linus Torvalds
2002-05-22 17:31 ` [PATCH] 2.5.17 IDE 69 Martin Dalecki
2002-05-23 7:32 ` [PATCH] 2.5.17 sysvipc (AKA: spoiling oil in to the flames) Martin Dalecki
2002-05-24 13:59 ` Linux-2.5.17 Martin Dalecki
2002-05-24 14:23 ` [PATCH] 2.5.17 IDE 70 Martin Dalecki
-- strict thread matches above, loose matches on Subject: below --
2002-05-21 18:52 Linux-2.5.17 Wayne.Brown
2002-05-21 21:30 ` Linux-2.5.17 David S. Miller
2002-05-22 7:36 ` Linux-2.5.17 Helge Hafting
2002-05-21 23:20 Linux-2.5.17 Wayne.Brown
2002-05-21 23:29 ` Linux-2.5.17 Russell King
2002-05-21 23:33 ` Linux-2.5.17 Joel Jaeggli
2002-05-22 3:02 Linux-2.5.17 Wayne.Brown
2002-05-22 7:12 ` Linux-2.5.17 Zwane Mwaikambo
2002-05-22 11:49 ` Linux-2.5.17 Nick Holloway
2002-05-22 20:00 Linux-2.5.17 Wayne.Brown
2002-05-23 12:17 ` Linux-2.5.17 Nick Holloway
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=3CEB9826.4070000@evision-ventures.com \
--to=dalecki@evision-ventures.com \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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).