From: Muli Ben-Yehuda <mulix@mulix.org>
To: Rusty Russell - trivial patches <trivial@rustcorp.com.au>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] remove #ifdef CONFIG_PROC_FS from ipc/sem.c
Date: Tue, 6 May 2003 11:36:17 +0300 [thread overview]
Message-ID: <20030506083617.GE31585@actcom.co.il> (raw)
[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]
Remove #ifdef CONFIG_PROC_FS from a couple of place in ipc/sem.c, as
they aren't needed and #ifdefs are ugly.
[also make a couple of lines fit in 80 chars]
diff -Naur --exclude-from /home/mulix/dontdiff vanilla/ipc/sem.c 2.5.69-ipc/ipc/sem.c
--- vanilla/ipc/sem.c 2003-05-05 02:53:12.000000000 +0300
+++ 2.5.69-ipc/ipc/sem.c 2003-05-06 11:34:41.000000000 +0300
@@ -80,9 +80,8 @@
static int newary (key_t, int, int);
static void freeary (int id);
-#ifdef CONFIG_PROC_FS
-static int sysvipc_sem_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data);
-#endif
+static int sysvipc_sem_read_proc(char *buffer, char **start, off_t offset,
+ int length, int *eof, void *data);
#define SEMMSL_FAST 256 /* 512 bytes on stack */
#define SEMOPM_FAST 64 /* ~ 372 bytes on stack */
@@ -109,9 +108,7 @@
used_sems = 0;
ipc_init_ids(&sem_ids,sc_semmni);
-#ifdef CONFIG_PROC_FS
create_proc_read_entry("sysvipc/sem", 0, 0, sysvipc_sem_read_proc, NULL);
-#endif
}
static int newary (key_t key, int nsems, int semflg)
@@ -1292,21 +1289,23 @@
unlock_kernel();
}
-#ifdef CONFIG_PROC_FS
-static int sysvipc_sem_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
+static int sysvipc_sem_read_proc(char *buffer, char **start, off_t offset,
+ int length, int *eof, void *data)
{
off_t pos = 0;
off_t begin = 0;
int i, len = 0;
- len += sprintf(buffer, " key semid perms nsems uid gid cuid cgid otime ctime\n");
+ len += sprintf(buffer, " key semid perms nsems "
+ "uid gid cuid cgid otime ctime\n");
down(&sem_ids.sem);
for(i = 0; i <= sem_ids.max_id; i++) {
struct sem_array *sma;
sma = sem_lock(i);
if(sma) {
- len += sprintf(buffer + len, "%10d %10d %4o %10lu %5u %5u %5u %5u %10lu %10lu\n",
+ len += sprintf(buffer + len, "%10d %10d %4o %10lu "
+ "%5u %5u %5u %5u %10lu %10lu\n",
sma->sem_perm.key,
sem_buildid(i,sma->sem_perm.seq),
sma->sem_perm.mode,
@@ -1339,4 +1338,3 @@
len = 0;
return len;
}
-#endif
--
Muli Ben-Yehuda
http://www.mulix.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2003-05-06 8:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030506083617.GE31585@actcom.co.il \
--to=mulix@mulix.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@rustcorp.com.au \
/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).