The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/fs/ntfs/sysctl.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * sysctl.c - System control stuff
    3  *
    4  * Copyright (C) 1997 Martin von Löwis
    5  * Copyright (C) 1997 Régis Duchesne
    6  */
    7 
    8 #include "sysctl.h"
    9 
   10 #ifdef DEBUG
   11 #include <linux/locks.h>
   12 #include <linux/sysctl.h>
   13 
   14 int ntdebug = 0;
   15 
   16 /* Add or remove the debug sysctl
   17  * Is this really the only file system with sysctls ?
   18  */
   19 void ntfs_sysctl(int add)
   20 {
   21 #define FS_NTFS             1
   22         /* Definition of the sysctl */
   23         static ctl_table ntfs_sysctls[]={
   24                 {FS_NTFS,                  /* ID */
   25                  "ntfs-debug",             /* name in /proc */
   26                  &ntdebug,sizeof(ntdebug), /* data ptr, data size */
   27                  0644,                     /* mode */
   28                  0,                        /* child */
   29                  proc_dointvec,            /* proc handler */
   30                  0,                        /* strategy */
   31                  0,                        /* proc control block */
   32                  0,0},                     /* extra */
   33                 {0}
   34         };
   35         /* Define the parent file : /proc/sys/fs */
   36         static ctl_table sysctls_root[]={
   37                 {CTL_FS,
   38                  "fs",
   39                  NULL,0,
   40                  0555,
   41                  ntfs_sysctls},
   42                 {0}
   43         };
   44         static struct ctl_table_header *sysctls_root_header = NULL;
   45 
   46         if(add){
   47                 if(!sysctls_root_header)
   48                         sysctls_root_header = register_sysctl_table(sysctls_root, 0);
   49         } else if(sysctls_root_header) {
   50                 unregister_sysctl_table(sysctls_root_header);
   51                 sysctls_root_header = NULL;
   52         }
   53 }
   54 #endif /* DEBUG */
   55 

Cache object: 6ae7df01add038b778292da754fc50cc


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.