summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3821e14)
raw | patch | inline | side by side (parent: 3821e14)
author | octo <octo> | |
Sat, 15 Apr 2006 10:04:50 +0000 (10:04 +0000) | ||
committer | octo <octo> | |
Sat, 15 Apr 2006 10:04:50 +0000 (10:04 +0000) |
src/disk.c | patch | blob | history |
diff --git a/src/disk.c b/src/disk.c
index ded2080626f1a12dfba17f776909127153ce945d..1b8f2f3d43424414d4630417fb9b311ed8cef591 100644 (file)
--- a/src/disk.c
+++ b/src/disk.c
#define MODULE_NAME "disk"
-#if defined(KERNEL_LINUX) || defined(HAVE_LIBKSTAT)
+#if KERNEL_LINUX || HAVE_LIBKSTAT
# define DISK_HAVE_READ 1
#else
# define DISK_HAVE_READ 0
};
static int part_ds_num = 4;
-#ifdef KERNEL_LINUX
+#if KERNEL_LINUX
typedef struct diskstats
{
char *name;
} diskstats_t;
static diskstats_t *disklist;
-/* #endif defined(KERNEL_LINUX) */
+/* #endif KERNEL_LINUX */
-#elif defined(HAVE_LIBKSTAT)
+#elif HAVE_LIBKSTAT
#define MAX_NUMDISK 256
extern kstat_ctl_t *kc;
static kstat_t *ksp[MAX_NUMDISK];
static void disk_init (void)
{
-#ifdef HAVE_LIBKSTAT
+#if KERNEL_LINUX
+ /* No init needed */
+/* #endif KERNEL_LINUX */
+
+#elif HAVE_LIBKSTAT
kstat_t *ksp_chain;
numdisk = 0;
continue;
ksp[numdisk++] = ksp_chain;
}
-#endif
+#endif /* HAVE_LIBKSTAT */
return;
}
static void disk_read (void)
{
-#ifdef KERNEL_LINUX
+#if KERNEL_LINUX
FILE *fh;
char buffer[1024];
char disk_name[128];
fclose (fh);
/* #endif defined(KERNEL_LINUX) */
-#elif defined(HAVE_LIBKSTAT)
+#elif HAVE_LIBKSTAT
static kstat_io_t kio;
int i;