]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/nfsquota.c
merged logging code into main branch. use configure option --without-logfile to...
[netatalk.git] / etc / afpd / nfsquota.c
index a035cf61d4a1c56606b74e70dda9aa6b48305d75..0e93e4ab243a93cd4b29c32d0e7693db9e14aa5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nfsquota.c,v 1.5 2001-12-03 05:03:38 jmarcus Exp $
+ * $Id: nfsquota.c,v 1.6 2002-01-04 04:45:47 sibaz Exp $
  *
  * parts of this are lifted from the bsd quota program and are
  * therefore under the following copyright:
@@ -39,7 +39,7 @@ char *strchr (), *strrchr ();
 #include <sys/socket.h>
 #include <sys/param.h> /* for DEV_BSIZE */
 #include <sys/time.h>  /* <rpc/rpc.h> on ultrix doesn't include this */
-#include <syslog.h>
+#include <atalk/logger.h>
 
 #ifdef HAVE_NETDB_H
 #include <netdb.h>
@@ -115,7 +115,7 @@ int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
 
     /* figure out the host and path */
     if ((hostpath = strchr(vol->v_gvs, ':')) == NULL) {
-        syslog(LOG_ERR, "can't find hostname for %s", vol->v_gvs);
+        LOG(log_error, logtype_default, "can't find hostname for %s", vol->v_gvs);
         return AFPERR_PARAM;
     }
 
@@ -131,7 +131,7 @@ int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
     if(callaurpc(vol, RQUOTAPROG, RQUOTAVERS, RQUOTAPROC_GETQUOTA,
                  (xdrproc_t) xdr_getquota_args, (char *) &gq_args,
                  (xdrproc_t) xdr_getquota_rslt, (char *) &gq_rslt) != 0) {
-        syslog(LOG_INFO, "nfsquota: can't retrieve nfs quota information. \
+        LOG(log_info, logtype_default, "nfsquota: can't retrieve nfs quota information. \
                make sure that rpc.rquotad is running on %s.", vol->v_gvs);
         *hostpath = ':';
         return AFPERR_PARAM;
@@ -142,7 +142,7 @@ int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
         break;
 
     case Q_EPERM:
-        syslog(LOG_ERR, "nfsquota: quota permission error, host: %s\n",
+        LOG(log_error, logtype_default, "nfsquota: quota permission error, host: %s\n",
                vol->v_gvs);
         break;
 
@@ -177,7 +177,7 @@ int getnfsquota(const struct vol *vol, const int uid, const u_int32_t bsize,
         break;
 
     default:
-        syslog(LOG_INFO, "bad rpc result, host: %s\n", vol->v_gvs);
+        LOG(log_info, logtype_default, "bad rpc result, host: %s\n", vol->v_gvs);
         break;
     }