build: Remove sys_fopen wrapper
authorAndrew Bartlett <abartlet@samba.org>
Wed, 28 Mar 2012 01:51:17 +0000 (12:51 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2012 00:39:08 +0000 (02:39 +0200)
source3/include/proto.h
source3/lib/smbconf/testsuite.c
source3/lib/system.c
source3/passdb/pdb_smbpasswd.c
source3/smbd/quotas.c
source3/web/swat.c

index e603d0d839c72cd9a33cc4c7107cb17e8ae0cf53..654735a483e0d1b703bc276dc0c0a0fc86a0bbdc 100644 (file)
@@ -336,7 +336,6 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
              bool fake_dir_create_times);
 int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len);
 int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OFF_T len);
-FILE *sys_fopen(const char *path, const char *type);
 void kernel_flock(int fd, uint32 share_mode, uint32 access_mask);
 SMB_STRUCT_DIR *sys_opendir(const char *name);
 SMB_STRUCT_DIR *sys_fdopendir(int fd);
index 9e679362a325186a7bcb1e5b7e6c37ac46b0d2aa..5638fd24540422e85a54b6f49a67074e11f51f75 100644 (file)
@@ -183,7 +183,7 @@ static bool create_conf_file(const char *filename)
        FILE *f;
 
        printf("TEST: creating file\n");
-       f = sys_fopen(filename, "w");
+       f = fopen(filename, "w");
        if (!f) {
                printf("failure: failed to open %s for writing: %s\n",
                       filename, strerror(errno));
index f22215d2a1872435bb1845d0bf4e52a5ae8f2646..421beb53fd28dcc1249887c8d03f83ad4cd795bb 100644 (file)
@@ -584,16 +584,6 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF
 #endif
 }
 
-/*******************************************************************
- An fopen() wrapper.
-********************************************************************/
-
-FILE *sys_fopen(const char *path, const char *type)
-{
-       return fopen(path, type);
-}
-
-
 #if HAVE_KERNEL_SHARE_MODES
 #ifndef LOCK_MAND
 #define LOCK_MAND      32      /* This is a mandatory flock */
index 7f82c1f7cd744a9172733f21152beb9051dee074..5fda3639508a372be5395049288b8be8c73547b7 100644 (file)
@@ -237,14 +237,14 @@ creating file %s\n", pfile));
        for(race_loop = 0; race_loop < 5; race_loop++) {
                DEBUG(10, ("startsmbfilepwent_internal: opening file %s\n", pfile));
 
-               if((fp = sys_fopen(pfile, open_mode)) == NULL) {
+               if((fp = fopen(pfile, open_mode)) == NULL) {
 
                        /*
                         * If smbpasswd file doesn't exist, then create new one. This helps to avoid
                         * confusing error msg when adding user account first time.
                         */
                        if (errno == ENOENT) {
-                               if ((fp = sys_fopen(pfile, "a+")) != NULL) {
+                               if ((fp = fopen(pfile, "a+")) != NULL) {
                                        DEBUG(0, ("startsmbfilepwent_internal: file %s did not \
 exist. File successfully created.\n", pfile));
                                } else {
@@ -762,7 +762,7 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con
        }
        DEBUG(10, ("mod_smbfilepwd_entry: opening file %s\n", pfile));
 
-       fp = sys_fopen(pfile, "r+");
+       fp = fopen(pfile, "r+");
 
        if (fp == NULL) {
                DEBUG(0, ("mod_smbfilepwd_entry: unable to open file %s\n", pfile));
index c2616157e43fb6b300792872a4eb837ab73b4baf..caf02445dc5409715303c0a11533e15d3be1b908 100644 (file)
@@ -807,7 +807,7 @@ bool disk_quotas(const char *path,
        DEBUG(5,("disk_quotas: looking for path \"%s\" devno=%x\n",
                path, (unsigned int)devno));
 #if defined(SUNOS5)
-       if ((fd = sys_fopen(MNTTAB, "r")) == NULL) {
+       if ((fd = fopen(MNTTAB, "r")) == NULL) {
                return false;
        }
 
index 0e17b015e949ee56aca0d30c167f6c0ea1567c1a..1e676a5aecc90b2da8c9e42258506b975cb13df8 100644 (file)
@@ -561,7 +561,7 @@ static int save_reload(int snum)
        FILE *f;
        struct stat st;
 
-       f = sys_fopen(get_dyn_CONFIGFILE(),"w");
+       f = fopen(get_dyn_CONFIGFILE(),"w");
        if (!f) {
                printf(_("failed to open %s for writing"), get_dyn_CONFIGFILE());
                printf("\n");