]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Fix trailing whitespace
authorVolker Lendecke <vl@samba.org>
Mon, 20 Oct 2025 15:42:40 +0000 (17:42 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 10 Nov 2025 13:29:30 +0000 (13:29 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/lib/sysquotas.c
source3/lib/sysquotas_4A.c
source3/lib/sysquotas_linux.c
source3/lib/sysquotas_nfs.c
source3/lib/sysquotas_xfs.c

index a984ec559c2a0ad5c73ae4cbc62e373acff3a4d3..bdf88bf3ff0835c907bccf4532933b2ff5d611bb 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    System QUOTA function wrappers
    Copyright (C) Stefan (metze) Metzmacher     2003
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -27,7 +27,7 @@
 
 #ifdef HAVE_SYS_QUOTAS
 
-#if defined(HAVE_QUOTACTL_4A) 
+#if defined(HAVE_QUOTACTL_4A)
 
 /*#endif HAVE_QUOTACTL_4A */
 #elif defined(HAVE_QUOTACTL_4B)
@@ -117,7 +117,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
        if (fp == NULL) {
                goto out;
        }
-  
+
        while ((mnt = getmntent(fp))) {
                if (!strequal(mnt->mnt_dir, stat_mntpath)) {
                        continue;
@@ -165,15 +165,15 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
        (*mntpath) = NULL;
        (*bdev) = NULL;
        (*fs) = NULL;
-       
+
        /* find the block device file */
 
        if ((ret=sys_stat(path, &S, false))!=0) {
                return ret;
        }
-       
+
        if ((ret=devnm(S_IFBLK, S.st_ex_dev, dev_disk, 256, 1))!=0) {
-               return ret;     
+               return ret;
        }
 
        /* we should get the mntpath right...
@@ -188,10 +188,10 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
                SAFE_FREE(*mntpath);
                SAFE_FREE(*bdev);
                ret = -1;
-       }       
-       
-       
-       return ret;     
+       }
+
+
+       return ret;
 }
 
 /* #endif HAVE_DEVNM */
@@ -207,7 +207,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
        (*mntpath) = NULL;
        (*bdev) = NULL;
        (*fs) = NULL;
-       
+
        (*mntpath) = SMB_STRDUP(path);
        if (*mntpath) {
                ret = 0;
@@ -364,7 +364,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
                        if (p && *p) {
                                dp->ihardlimit = STR_TO_SMB_BIG_UINT(p, &p);
                        } else {
-                               goto invalid_param;     
+                               goto invalid_param;
                        }
 
                        while (p && *p && isspace(*p)) {
@@ -382,7 +382,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 
                        DEBUG (3, ("Parsed output of get_quota, ...\n"));
 
-                       DEBUGADD (5,( 
+                       DEBUGADD (5,(
                                "qflags:%"PRIu32" curblocks:%"PRIu64" softlimit:%"PRIu64" hardlimit:%"PRIu64"\n"
                                "curinodes:%"PRIu64" isoftlimit:%"PRIu64" ihardlimit:%"PRIu64" bsize:%"PRIu64"\n",
                                dp->qflags,dp->curblocks,
@@ -498,7 +498,7 @@ int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
        if (!path||!dp)
                smb_panic("sys_get_quota: called with NULL pointer");
 
-       if (command_get_quota(path, qtype, id, dp)==0) {        
+       if (command_get_quota(path, qtype, id, dp)==0) {
                return 0;
        } else if (errno != ENOSYS) {
                return -1;
@@ -523,8 +523,8 @@ int sys_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
                                        fs,mntpath,bdev,qtype,(qtype==SMB_GROUP_QUOTA_TYPE?id.gid:id.uid)));
                        }
                        ready = True;
-                       break;  
-               }               
+                       break;
+               }
        }
 
        if (!ready) {
@@ -560,7 +560,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
        if (!path||!dp)
                smb_panic("get_smb_quota: called with NULL pointer");
 
-       if (command_set_quota(path, qtype, id, dp)==0) {        
+       if (command_set_quota(path, qtype, id, dp)==0) {
                return 0;
        } else if (errno != ENOSYS) {
                return -1;
@@ -572,7 +572,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
        }
 
        errno = 0;
-       DEBUG(10,("sys_set_quota() uid(%u, %u)\n", (unsigned)getuid(), (unsigned)geteuid())); 
+       DEBUG(10,("sys_set_quota() uid(%u, %u)\n", (unsigned)getuid(), (unsigned)geteuid()));
 
        for (i=0;(fs && sys_quota_backends[i].name && sys_quota_backends[i].set_quota);i++) {
                if (strcmp(fs,sys_quota_backends[i].name)==0) {
@@ -586,7 +586,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
                        }
                        ready = True;
                        break;
-               }               
+               }
        }
 
        if (!ready) {
@@ -605,7 +605,7 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
        SAFE_FREE(bdev);
        SAFE_FREE(fs);
 
-       return ret;             
+       return ret;
 }
 
 #else /* HAVE_SYS_QUOTAS */
@@ -616,4 +616,3 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI
        return;
 }
 #endif /* HAVE_SYS_QUOTAS */
-
index 674c4ee02db254a40992f0a9ca816d2d498aba29..5e36b501ac615abe8aa738dae0953913a3633fa9 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    System QUOTA function wrappers for QUOTACTL_4A
    Copyright (C) Stefan (metze) Metzmacher     2003
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -211,7 +211,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
                         * didn't work!
                         * So we just return 0
                         * --metze
-                        * 
+                        *
                         * On HPUX we didn't have the mount path,
                         * we need to fix sys_path_to_bdev()
                         *
@@ -226,25 +226,25 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
                        if ((qflags&QUOTAS_DENY_DISK)||(qflags&QUOTAS_ENABLED)) {
                                if (ret == 0) {
                                        char *quota_file = NULL;
-                                       
+
                                        asprintf(&quota_file,"/%s/%s%s",path, QUOTAFILENAME,USERQUOTAFILE_EXTENSION);
                                        if (quota_file == NULL) {
                                                DEBUG(0,("asprintf() failed!\n"));
                                                errno = ENOMEM;
                                                return -1;
                                        }
-                                       
+
                                        ret = quotactl(QCMD(Q_QUOTAON,USRQUOTA), (caddr_t)bdev, -1,(void *)quota_file);
                                } else {
-                                       ret = 0;        
+                                       ret = 0;
                                }
                        } else {
                                if (ret != 0) {
                                        /* turn off */
-                                       ret = quotactl(QCMD(Q_QUOTAOFF,USRQUOTA), (caddr_t)bdev, -1, (void *)0);        
+                                       ret = quotactl(QCMD(Q_QUOTAOFF,USRQUOTA), (caddr_t)bdev, -1, (void *)0);
                                } else {
                                        ret = 0;
-                               }               
+                               }
                        }
 
                        DEBUG(0,("sys_set_vfs_quota: ret(%d) errno(%d)[%s] uid(%d) bdev[%s]\n",
@@ -268,7 +268,7 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
                         * didn't work!
                         * So we just return 0
                         * --metze
-                        * 
+                        *
                         * On HPUX we didn't have the mount path,
                         * we need to fix sys_path_to_bdev()
                         *
@@ -283,25 +283,25 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
                        if ((qflags&QUOTAS_DENY_DISK)||(qflags&QUOTAS_ENABLED)) {
                                if (ret == 0) {
                                        char *quota_file = NULL;
-                                       
+
                                        asprintf(&quota_file,"/%s/%s%s",path, QUOTAFILENAME,GROUPQUOTAFILE_EXTENSION);
                                        if (quota_file == NULL) {
                                                DEBUG(0,("asprintf() failed!\n"));
                                                errno = ENOMEM;
                                                return -1;
                                        }
-                                       
+
                                        ret = quotactl(QCMD(Q_QUOTAON,GRPQUOTA), (caddr_t)bdev, -1,(void *)quota_file);
                                } else {
-                                       ret = 0;        
+                                       ret = 0;
                                }
                        } else {
                                if (ret != 0) {
                                        /* turn off */
-                                       ret = quotactl(QCMD(Q_QUOTAOFF,GRPQUOTA), (caddr_t)bdev, -1, (void *)0);        
+                                       ret = quotactl(QCMD(Q_QUOTAOFF,GRPQUOTA), (caddr_t)bdev, -1, (void *)0);
                                } else {
                                        ret = 0;
-                               }               
+                               }
                        }
 
                        DEBUG(0,("sys_set_vfs_quota: ret(%d) errno(%d)[%s] uid(%d) bdev[%s]\n",
index 4415f519ce06f4b08d8960169d2158fc3b6400fe..97dfa50bc124df6bb16a357300d44e0383a37abc 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    System QUOTA function wrappers for LINUX
    Copyright (C) Stefan (metze) Metzmacher     2003
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
index 14dcb028d0a307b21d218f2347e39b1b8356ea0c..95864b53c1cafb1b7e9140e0745d0663cf2915d2 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    System QUOTA function wrappers for NFS
    Copyright (C) Michael Adam 2010
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
index 6b184874435b98f0f06f2520f51eff998ec03dfe..fa45ad7eaf3de29d3b4bba94f429c5aa1ec6cad9 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    System QUOTA function wrappers for XFS
    Copyright (C) Stefan (metze) Metzmacher     2003
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -26,7 +26,7 @@
 #if defined(HAVE_SYS_QUOTAS) && defined(HAVE_XFS_QUOTAS)
 
 #ifdef HAVE_SYS_QUOTA_H
-#include <sys/quota.h> 
+#include <sys/quota.h>
 #endif
 
 /* this one should actually come from glibc: */
@@ -49,7 +49,7 @@
 #define Q_XGETQSTAT Q_GETQSTAT
 #endif /* Q_XGETQSTAT */
 
-/* currently doesn't support Group and Project quotas on IRIX 
+/* currently doesn't support Group and Project quotas on IRIX
  */
 
 #ifndef QCMD
@@ -81,10 +81,10 @@ int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 
        if (!bdev||!dp)
                smb_panic("sys_get_xfs_quota: called with NULL pointer");
-               
+
        ZERO_STRUCT(*dp);
        dp->qtype = qtype;
-               
+
        switch (qtype) {
                case SMB_USER_QUOTA_TYPE:
                        DEBUG(10,("sys_get_xfs_quota: path[%s] bdev[%s] SMB_USER_QUOTA_TYPE uid[%u]\n",
@@ -184,7 +184,7 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 
        if (!bdev||!dp)
                smb_panic("sys_set_xfs_quota: called with NULL pointer");
-       
+
        if (bsize == dp->bsize) {
                D.d_blk_softlimit = dp->softlimit;
                D.d_blk_hardlimit = dp->hardlimit;
@@ -219,13 +219,13 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
                                path, bdev, (unsigned)id.uid));
 
                        quotactl(QCMD(Q_XGETQSTAT,USRQUOTA), bdev, -1, (caddr_t)&F);
-                       
+
                        if (qflags & QUOTAS_DENY_DISK) {
                                if (!(F.qs_flags & XFS_QUOTA_UDQ_ENFD))
                                        q_on |= XFS_QUOTA_UDQ_ENFD;
                                if (!(F.qs_flags & XFS_QUOTA_UDQ_ACCT))
                                        q_on |= XFS_QUOTA_UDQ_ACCT;
-                               
+
                                if (q_on != 0) {
                                        ret = quotactl(QCMD(Q_XQUOTAON,USRQUOTA),bdev, -1, (caddr_t)&q_on);
                                } else {
@@ -277,13 +277,13 @@ int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
                                path, bdev, (unsigned)id.gid));
 
                        quotactl(QCMD(Q_XGETQSTAT,GRPQUOTA), bdev, -1, (caddr_t)&F);
-                       
+
                        if (qflags & QUOTAS_DENY_DISK) {
                                if (!(F.qs_flags & XFS_QUOTA_GDQ_ENFD))
                                        q_on |= XFS_QUOTA_GDQ_ENFD;
                                if (!(F.qs_flags & XFS_QUOTA_GDQ_ACCT))
                                        q_on |= XFS_QUOTA_GDQ_ACCT;
-                               
+
                                if (q_on != 0) {
                                        ret = quotactl(QCMD(Q_XQUOTAON,GRPQUOTA),bdev, -1, (caddr_t)&q_on);
                                } else {