2.5.70-mm5: XFS compile error if CONFIG_SYSCTL && !CONFIG_PROC_FS

2.5.70-mm5: XFS compile error if CONFIG_SYSCTL && !CONFIG_PROC_FS

Post by Adrian Bun » Sun, 08 Jun 2003 16:20:08



I'm getting the following compile error in 2.5.70-mm5 if CONFIG_SYSCTL
&& !CONFIG_PROC_FS:

<--  snip  -->

...
  CC      fs/xfs/linux/xfs_sysctl.o
fs/xfs/linux/xfs_sysctl.c: In function `xfs_stats_clear_proc_handler':
fs/xfs/linux/xfs_sysctl.c:61: `xfsstats' undeclared (first use in this function)
fs/xfs/linux/xfs_sysctl.c:61: (Each undeclared identifier is reported only once
fs/xfs/linux/xfs_sysctl.c:61: for each function it appears in.)
make[2]: *** [fs/xfs/linux/xfs_sysctl.o] Error 1

<--  snip  -->

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.70-mm5: XFS compile error if CONFIG_SYSCTL && !CONFIG_PROC_FS

Post by Christoph Hellwi » Mon, 09 Jun 2003 13:10:06



> I'm getting the following compile error in 2.5.70-mm5 if CONFIG_SYSCTL
> && !CONFIG_PROC_FS:

> <--  snip  -->

> ...
>   CC      fs/xfs/linux/xfs_sysctl.o
> fs/xfs/linux/xfs_sysctl.c: In function `xfs_stats_clear_proc_handler':
> fs/xfs/linux/xfs_sysctl.c:61: `xfsstats' undeclared (first use in this function)
> fs/xfs/linux/xfs_sysctl.c:61: (Each undeclared identifier is reported only once
> fs/xfs/linux/xfs_sysctl.c:61: for each function it appears in.)
> make[2]: *** [fs/xfs/linux/xfs_sysctl.o] Error 1

This should fix it:

--- 1.10/fs/xfs/linux/xfs_sysctl.c      Mon May 19 20:29:41 2003

 #include <linux/proc_fs.h>

-STATIC ulong xfs_min[XFS_PARAM] = { 0, 0, 0, 0, 0,   0, HZ };
-STATIC ulong xfs_max[XFS_PARAM] = { 1, 1, 1, 1, 127, 3, HZ * 60 };
+STATIC ulong xfs_min[XFS_PARAM] = { 0, 0, 0, 0, 0, HZ, 0 };
+STATIC ulong xfs_max[XFS_PARAM] = {  1, 1, 1, 127, 3, HZ * 60, 1 };

 static struct ctl_table_header *xfs_table_header;

-
+#ifdef CONFIG_PROC_FS
 STATIC int
 xfs_stats_clear_proc_handler(

        return ret;
 }
+#endif /* CONFIG_PROC_FS */

 STATIC ctl_table xfs_table[] = {
-       {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear,
-       sizeof(ulong), 0644, NULL, &xfs_stats_clear_proc_handler,
-       &sysctl_intvec, NULL, &xfs_min[0], &xfs_max[0]},
-
        {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[1], &xfs_max[1]},
+       &sysctl_intvec, NULL, &xfs_min[0], &xfs_max[0]},

        {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[2], &xfs_max[2]},
+       &sysctl_intvec, NULL, &xfs_min[1], &xfs_max[1]},

        {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[3], &xfs_max[3]},
+       &sysctl_intvec, NULL, &xfs_min[2], &xfs_max[2]},

        {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[4], &xfs_max[4]},
+       &sysctl_intvec, NULL, &xfs_min[3], &xfs_max[3]},

        {XFS_ERRLEVEL, "error_level", &xfs_params.error_level,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
-       &sysctl_intvec, NULL, &xfs_min[5], &xfs_max[5]},
+       &sysctl_intvec, NULL, &xfs_min[4], &xfs_max[4]},

        {XFS_SYNC_INTERVAL, "sync_interval", &xfs_params.sync_interval,
        sizeof(ulong), 0644, NULL, &proc_doulongvec_minmax,
+       &sysctl_intvec, NULL, &xfs_min[5], &xfs_max[5]},
+
+       /* please keep this the last entry */
+#ifdef CONFIG_PROC_FS
+       {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear,
+       sizeof(ulong), 0644, NULL, &xfs_stats_clear_proc_handler,
        &sysctl_intvec, NULL, &xfs_min[6], &xfs_max[6]},
+#endif

        {0}
 };
===== fs/xfs/linux/xfs_sysctl.h 1.8 vs edited =====
--- 1.8/fs/xfs/linux/xfs_sysctl.h       Mon May 19 20:29:41 2003

 #define XFS_PARAM      (sizeof(struct xfs_param) / sizeof(ulong))

 typedef struct xfs_param {
-       ulong   stats_clear;    /* Reset all XFS statistics to zero.     */
        ulong   restrict_chown; /* Root/non-root can give away files.    */
        ulong   sgid_inherit;   /* Inherit ISGID bit if process' GID is  */

        ulong   panic_mask;     /* bitmask to specify panics on errors.  */
        ulong   error_level;    /* Degree of reporting for internal probs*/
        ulong   sync_interval;  /* time between sync calls               */
+       ulong   stats_clear;    /* Reset all XFS statistics to zero.     */
 } xfs_param_t;


  */

 enum {
-       XFS_STATS_CLEAR = 1,
-       XFS_RESTRICT_CHOWN = 2,
-       XFS_SGID_INHERIT = 3,
-       XFS_SYMLINK_MODE = 4,
-       XFS_PANIC_MASK = 5,
-       XFS_ERRLEVEL = 6,
-       XFS_SYNC_INTERVAL = 7,
+       XFS_RESTRICT_CHOWN = 1,
+       XFS_SGID_INHERIT = 2,
+       XFS_SYMLINK_MODE = 3,
+       XFS_PANIC_MASK = 4,
+       XFS_ERRLEVEL = 5,
+       XFS_SYNC_INTERVAL = 6,
+       XFS_STATS_CLEAR = 7,
 };

 extern xfs_param_t     xfs_params;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.70-mm5: XFS compile error if CONFIG_SYSCTL && !CONFIG_PROC_FS

Post by Adrian Bun » Mon, 09 Jun 2003 15:00:12




> > I'm getting the following compile error in 2.5.70-mm5 if CONFIG_SYSCTL
> > && !CONFIG_PROC_FS:

> > <--  snip  -->

> > ...
> >   CC      fs/xfs/linux/xfs_sysctl.o
> > fs/xfs/linux/xfs_sysctl.c: In function `xfs_stats_clear_proc_handler':
> > fs/xfs/linux/xfs_sysctl.c:61: `xfsstats' undeclared (first use in this function)
> > fs/xfs/linux/xfs_sysctl.c:61: (Each undeclared identifier is reported only once
> > fs/xfs/linux/xfs_sysctl.c:61: for each function it appears in.)
> > make[2]: *** [fs/xfs/linux/xfs_sysctl.o] Error 1

> This should fix it:
>...

Thanks, I can confirm your patch fixes the problem.

cu
Adrian

--

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. 2.5.70-mm5: sc1200.c compile error if !CONFIG_PROC_FS

Fixed now.
--
Bartlomiej

[ide] fix compilation of NS SC1x00 driver without procfs

 drivers/ide/pci/sc1200.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff -puN drivers/ide/pci/sc1200.c~ide-sc1200-noprocfs-fix drivers/ide/pci/sc1200.c
--- linux-2.5.70-bk11/drivers/ide/pci/sc1200.c~ide-sc1200-noprocfs-fix  Sat Jun  7 17:15:46 2003

 #include "ide_modes.h"
 #include "sc1200.h"

-#define DISPLAY_SC1200_TIMINGS
-
-#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS)
-#include <linux/stat.h>
-#include <linux/proc_fs.h>
-
-static int sc1200_get_info(char *, char **, off_t, int);
-extern int (*sc1200_display_info)(char *, char **, off_t, int); /* ide-proc.c */
-extern char *ide_media_verbose(ide_drive_t *);
-static u8 sc1200_proc = 0;
-
 #define SC1200_REV_A   0x00
 #define SC1200_REV_B1  0x01

        return pci_clock;
 }

+#define DISPLAY_SC1200_TIMINGS
+
+#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS)
+#include <linux/stat.h>
+#include <linux/proc_fs.h>
+
+static int sc1200_get_info(char *, char **, off_t, int);
+extern int (*sc1200_display_info)(char *, char **, off_t, int); /* ide-proc.c */
+extern char *ide_media_verbose(ide_drive_t *);
+static u8 sc1200_proc = 0;
+
 static struct pci_dev *bmide_dev;

 static int sc1200_get_info (char *buffer, char **addr, off_t offset, int count)

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Speed of X in comparison with NT

3. Kingmax 301a problem

4. 2.5.70-mm5: fix ieee1394_core.c compile if !CONFIG_PROC_FS

5. Permission denied via telnet and ftp

6. [2.5.70][ANNOUNCE] kexec for 2.5.70 available

7. MacOS under Linux-Pmac

8. 2.5.70 and 2.5.70-mm3 hang on bootup

9. 2.5.70-mm5

10. error in 2.5.70 compile with drm_radeon

11. ALSA Segmentation fault load modules 2.5.70 and 2.5.70mm1

12. Kernel 2.5.70 compile errors