Group :: System/Kernel and hardware
RPM: autofs
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: autofs-4.1.4-format.patch
Download
Download
diff -uNr autofs-4.1.4-orig/daemon/automount.c autofs-4.1.4/daemon/automount.c
--- autofs-4.1.4-orig/daemon/automount.c 2005-03-06 12:43:55 +0300
+++ autofs-4.1.4/daemon/automount.c 2005-05-08 19:19:19 +0400
@@ -221,7 +221,7 @@
if (st->st_dev != ap.dev)
return 0;
} else {
- info("rm_unwanted: %s\n", file);
+ info("rm_unwanted: %s", file);
if (S_ISDIR(st->st_mode))
rmdir(file);
else if (!S_ISLNK(st->st_mode) || rmsymlink)
@@ -254,7 +254,7 @@
struct mnt_list *mntlist = NULL;
struct mnt_list *mptr;
- debug("umount_multi: path=%s incl=%d\n", path, incl);
+ debug("umount_multi: path=%s incl=%d", path, incl);
mntlist = get_mnt_list(_PATH_MOUNTED, path, incl);
@@ -266,7 +266,7 @@
left = 0;
for (mptr = mntlist; mptr != NULL; mptr = mptr->next) {
- debug("umount_multi: unmounting dir=%s\n", mptr->path);
+ debug("umount_multi: unmounting dir=%s", mptr->path);
if (umount_ent("", mptr->path, mptr->fs_type)) {
left++;
}
@@ -317,7 +317,7 @@
PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
if (rv & MTAB_NOTUPDATED) {
info("umount %s succeeded: "
- "mtab not updated, retrying to clean\n",
+ "mtab not updated, retrying to clean",
ap.path);
rv = spawnll(LOG_DEBUG,
PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
@@ -329,16 +329,16 @@
break;
}
if (i < retries - 1) {
- info("umount %s failed: retrying...\n", ap.path);
+ info("umount %s failed: retrying...", ap.path);
sleep(1);
}
}
if (rv != 0 || i == retries) {
- error("can't unmount %s\n", ap.path);
+ error("can't unmount %s", ap.path);
DB(kill(0, SIGSTOP));
} else {
if (i != 0)
- info("umount %s succeeded\n", ap.path);
+ info("umount %s succeeded", ap.path);
if (submount)
rm_unwanted(ap.path, 1, 1);
@@ -481,7 +481,7 @@
static void nextstate(enum states next)
{
if (write(ap.state_pipe[1], &next, sizeof(next)) != sizeof(next))
- error("nextstate: write failed %m");
+ error("nextstate: write failed %s", strerror(errno));
}
/* Deal with all the signal-driven events in the state machine */
@@ -527,9 +527,9 @@
{
if (wait_queue_token == 0)
return 0;
- debug("send_ready: token=%d\n", wait_queue_token);
+ debug("send_ready: token=%d", wait_queue_token);
if (ioctl(ap.ioctlfd, AUTOFS_IOC_READY, wait_queue_token) < 0) {
- error("AUTOFS_IOC_READY: %m");
+ error("AUTOFS_IOC_READY: %s", strerror(errno));
return 1;
}
return 0;
@@ -539,9 +539,9 @@
{
if (wait_queue_token == 0)
return 0;
- debug("send_fail: token=%d\n", wait_queue_token);
+ debug("send_fail: token=%d", wait_queue_token);
if (ioctl(ap.ioctlfd, AUTOFS_IOC_FAIL, wait_queue_token) < 0) {
- syslog(LOG_ERR, "AUTOFS_IOC_FAIL: %m");
+ error("AUTOFS_IOC_FAIL: %s", strerror(errno));
return 1;
}
return 0;
@@ -559,7 +559,7 @@
while ((pid = waitpid(-1, &status, hang ? 0 : WNOHANG)) > 0) {
struct pending_mount volatile *mt, *volatile *mtp;
- debug("handle_child: got pid %d, sig %d (%d), stat %d\n",
+ debug("handle_child: got pid %d, sig %d (%d), stat %d",
pid, WIFSIGNALED(status),
WTERMSIG(status), WEXITSTATUS(status));
@@ -673,7 +673,7 @@
static int st_ready(void)
{
- debug("st_ready(): state = %d\n", ap.state);
+ debug("st_ready(): state = %d", ap.state);
ap.state = ST_READY;
sigprocmask(SIG_UNBLOCK, &lock_sigs, NULL);
@@ -783,13 +783,13 @@
* words) the umounts are done by the time we reach here
*/
if ((count = count_mounts(ap.path))) {
- debug("expire_proc: %d remaining in %s\n", count, ap.path);
+ debug("expire_proc: %d remaining in %s", count, ap.path);
exit(1);
}
exit(0);
case -1:
- error("expire: fork failed: %m");
+ error("expire: fork failed: %s", strerror(errno));
sigprocmask(SIG_SETMASK, &old, NULL);
return EXP_ERROR;
@@ -806,7 +806,7 @@
status = ap.lookup->lookup_ghost(ap.path, ap.ghost, 0, ap.lookup->context);
- debug("st_readmap: status %d\n", status);
+ debug("st_readmap: status %d", status);
/* If I don't exist in the map any more then exit */
if (status == LKP_FAIL)
@@ -819,7 +819,7 @@
{
int exp;
- info("prep_shutdown: state = %d\n", ap.state);
+ info("prep_shutdown: state = %d", ap.state);
assert(ap.state == ST_READY || ap.state == ST_EXPIRE);
@@ -838,7 +838,7 @@
/* Unmount everything */
exp = expire_proc(1);
- debug("prep_shutdown: expire returns %d\n", exp);
+ debug("prep_shutdown: expire returns %d", exp);
switch (exp) {
case EXP_ERROR:
@@ -862,7 +862,7 @@
static int st_prune(void)
{
- debug("st_prune(): state = %d\n", ap.state);
+ debug("st_prune(): state = %d", ap.state);
assert(ap.state == ST_READY);
@@ -890,7 +890,7 @@
static int st_expire(void)
{
- debug("st_expire(): state = %d\n", ap.state);
+ debug("st_expire(): state = %d", ap.state);
assert(ap.state == ST_READY);
@@ -947,7 +947,7 @@
if (poll(fds, 2, -1) == -1) {
if (errno == EINTR)
continue;
- syslog(LOG_ERR, "get_pkt: poll failed: %m");
+ error("get_pkt: poll failed: %s", strerror(errno));
return -1;
}
@@ -1042,7 +1042,7 @@
junk_mounts = junk_mounts->next;
} else {
if (!(mt = malloc(sizeof(struct pending_mount)))) {
- error("handle_packet_missing: malloc: %m");
+ error("handle_packet_missing: malloc failure");
send_fail(pkt->wait_queue_token);
return 1;
}
@@ -1068,7 +1068,7 @@
f = fork();
if (f == -1) {
sigprocmask(SIG_SETMASK, &oldsig, NULL);
- error("handle_packet_missing: fork: %m");
+ error("handle_packet_missing: fork: %s", strerror(errno));
send_fail(pkt->wait_queue_token);
free(mt);
@@ -1169,7 +1169,7 @@
chdir("/");
if (ret)
- error("failed to recover from partial expiry of %s\n",
+ error("failed to recover from partial expiry of %s",
buf);
}
}
@@ -1193,7 +1193,7 @@
} else {
if (!(mt = malloc(sizeof(struct pending_mount)))) {
sigprocmask(SIG_SETMASK, &olds, NULL);
- error("handle_expire: malloc: %m");
+ error("handle_expire: malloc failure");
return 1;
}
}
@@ -1201,7 +1201,7 @@
f = fork();
if (f == -1) {
sigprocmask(SIG_SETMASK, &olds, NULL);
- error("handle_expire: fork: %m");
+ error("handle_expire: fork: %s", strerror(errno));
free(mt);
return 1;
@@ -1256,7 +1256,7 @@
if (get_pkt(ap.pipefd, &pkt))
return -1;
- debug("handle_packet: type = %d\n", pkt.hdr.type);
+ debug("handle_packet: type = %d", pkt.hdr.type);
switch (pkt.hdr.type) {
case autofs_ptype_missing:
@@ -1268,7 +1268,7 @@
case autofs_ptype_expire_multi:
return handle_packet_expire_multi(&pkt.expire_multi);
}
- error("handle_packet: unknown packet type %d\n", pkt.hdr.type);
+ error("handle_packet: unknown packet type %d", pkt.hdr.type);
return -1;
}
@@ -1311,20 +1311,20 @@
* signals. This call also sets us as the process group leader.
*/
if (!submount && (setsid() == -1)) {
- crit("setsid: %m");
+ crit("setsid: %s", strerror(errno));
exit(1);
}
my_pgrp = getpgrp();
/* Redirect all our file descriptors to /dev/null */
if ((nullfd = open("/dev/null", O_RDWR)) < 0) {
- crit("cannot open /dev/null: %m");
+ crit("cannot open /dev/null: %s", strerror(errno));
exit(1);
}
if (dup2(nullfd, STDIN_FILENO) < 0 ||
dup2(nullfd, STDOUT_FILENO) < 0 || dup2(nullfd, STDERR_FILENO) < 0) {
- crit("redirecting file descriptors failed: %m");
+ crit("redirecting file descriptors failed: %s", strerror(errno));
exit(1);
}
close(nullfd);
@@ -1335,7 +1335,8 @@
fprintf(pidfp, "%lu\n", (unsigned long) my_pid);
fclose(pidfp);
} else {
- warn("failed to write pid file %s: %m", pid_file);
+ warn("failed to write pid file %s: %s", pid_file,
+ strerror(errno));
pid_file = NULL;
}
}
@@ -1357,7 +1358,8 @@
if ((!ap.ghost || !submount) && (*(path + 1) != '-') && ap.dir_created)
if (rmdir(path) == -1)
- warn("failed to remove dir %s: %m", path);
+ warn("failed to remove dir %s: %s",
+ path, strerror(errno));
exit(exit_code);
}
@@ -1558,7 +1560,7 @@
if (!ioctl(ap.ioctlfd, AUTOFS_IOC_PROTOVER, &kproto_version)) {
/* If this ioctl() doesn't work, kernel does not support ghosting */
if (ioctl(ap.ioctlfd, AUTOFS_IOC_PROTOSUBVER, &kproto_sub_version)) {
- debug("kproto sub: %m");
+ debug("kproto sub: %s", strerror(errno));
kproto_sub_version = 0;
if (ap.ghost) {
ap.ghost = 0;
@@ -1566,7 +1568,7 @@
}
}
} else {
- debug("kproto: %m");
+ debug("kproto: %s", strerror(errno));
kproto_version = 2;
}
@@ -1721,7 +1723,7 @@
}
if (geteuid() != 0) {
- fprintf(stderr, "%s: This program must be run by root.\n", program);
+ fprintf(stderr, "%s: This program must be run by root\n", program);
exit(1);
}
diff -uNr autofs-4.1.4-orig/daemon/module.c autofs-4.1.4/daemon/module.c
--- autofs-4.1.4-orig/daemon/module.c 2004-01-29 19:01:22 +0300
+++ autofs-4.1.4/daemon/module.c 2005-05-08 19:19:19 +0400
@@ -37,7 +37,7 @@
mod = malloc(sizeof(struct lookup_mod));
if (!mod) {
if (err_prefix)
- crit("%s%m", err_prefix);
+ crit("%smalloc failure", err_prefix);
return NULL;
}
@@ -46,7 +46,7 @@
if (!fnbuf) {
free(mod);
if (err_prefix)
- crit("%s%m", err_prefix);
+ crit("%salloca failure", err_prefix);
return NULL;
}
snprintf(fnbuf, size_fnbuf, "%s/lookup_%s.so", AUTOFS_LIB_DIR, name);
@@ -114,7 +114,7 @@
mod = malloc(sizeof(struct parse_mod));
if (!mod) {
if (err_prefix)
- crit("%s%m", err_prefix);
+ crit("%smalloc failure", err_prefix);
return NULL;
}
@@ -123,7 +123,7 @@
if (!fnbuf) {
free(mod);
if (err_prefix)
- crit("%s%m", err_prefix);
+ crit("%salloca failure", err_prefix);
return NULL;
}
snprintf(fnbuf, size_fnbuf, "%s/parse_%s.so", AUTOFS_LIB_DIR, name);
@@ -189,7 +189,7 @@
mod = malloc(sizeof(struct mount_mod));
if (!mod) {
if (err_prefix)
- crit("%s%m", err_prefix);
+ crit("%smalloc failure", err_prefix);
return NULL;
}
@@ -198,7 +198,7 @@
if (!fnbuf) {
free(mod);
if (err_prefix)
- crit("%s%m", err_prefix);
+ crit("%salloca failure", err_prefix);
return NULL;
}
snprintf(fnbuf, size_fnbuf, "%s/mount_%s.so", AUTOFS_LIB_DIR, name);
diff -uNr autofs-4.1.4-orig/lib/cache.c autofs-4.1.4/lib/cache.c
--- autofs-4.1.4-orig/lib/cache.c 2005-05-08 19:16:37 +0400
+++ autofs-4.1.4/lib/cache.c 2005-05-08 19:19:19 +0400
@@ -439,8 +439,8 @@
if (stat(fullpath, &st) == -1 && errno == ENOENT) {
if (mkdir_path(fullpath, 0555) < 0)
warn("cache_ghost: mkdir_path %s "
- "failed: %m",
- fullpath);
+ "failed: %s",
+ fullpath, strerror(errno));
}
break;
diff -uNr autofs-4.1.4-orig/lib/cache.c.orig autofs-4.1.4/lib/cache.c.orig
diff -uNr autofs-4.1.4-orig/lib/mounts.c autofs-4.1.4/lib/mounts.c
--- autofs-4.1.4-orig/lib/mounts.c 2005-01-17 18:09:28 +0300
+++ autofs-4.1.4/lib/mounts.c 2005-05-08 19:19:19 +0400
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
+#include <errno.h>
#include "automount.h"
@@ -43,7 +44,7 @@
tab = setmntent(table, "r");
if (!tab) {
- error("get_mntlist: setmntent: %m");
+ error("get_mntlist: setmntent: %s", strerror(errno));
return NULL;
}
@@ -261,7 +262,7 @@
tab = setmntent(table, "r");
if (!tab) {
- error("find_mntent: setmntent: %m");
+ error("find_mntent: setmntent: %s", strerror(errno));
return 0;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_file.c autofs-4.1.4/modules/lookup_file.c
--- autofs-4.1.4-orig/modules/lookup_file.c 2005-05-08 19:16:37 +0400
+++ autofs-4.1.4/modules/lookup_file.c 2005-05-08 19:19:19 +0400
@@ -57,7 +57,7 @@
struct stat st;
if (!(*context = ctxt = malloc(sizeof(struct lookup_context)))) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_hesiod.c autofs-4.1.4/modules/lookup_hesiod.c
--- autofs-4.1.4-orig/modules/lookup_hesiod.c 2004-12-31 09:30:08 +0300
+++ autofs-4.1.4/modules/lookup_hesiod.c 2005-05-08 19:19:19 +0400
@@ -42,7 +42,7 @@
/* If we can't build a context, bail. */
if ((*context = ctxt = (struct lookup_context *)
malloc(sizeof(struct lookup_context))) == NULL) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
@@ -82,7 +82,7 @@
hes_result = hes_resolve(name, "filsys");
if (!hes_result || !hes_result[0]) {
- warn(MODPREFIX "entry \"%s\" not found in map\n", name);
+ warn(MODPREFIX "entry \"%s\" not found in map", name);
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_ldap.c autofs-4.1.4/modules/lookup_ldap.c
--- autofs-4.1.4-orig/modules/lookup_ldap.c 2005-02-27 08:37:14 +0300
+++ autofs-4.1.4/modules/lookup_ldap.c 2005-05-08 19:19:19 +0400
@@ -114,7 +114,7 @@
ctxt = (struct lookup_context *) malloc(sizeof(struct lookup_context));
*context = ctxt;
if (ctxt == NULL) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
memset(ctxt, 0, sizeof(struct lookup_context));
@@ -215,7 +215,7 @@
query = alloca(l);
if (query == NULL) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 0;
}
@@ -404,7 +404,7 @@
query = alloca(l);
if (query == NULL) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 0;
}
@@ -512,7 +512,7 @@
query = alloca(l);
if (query == NULL) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 0;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_multi.c autofs-4.1.4/modules/lookup_multi.c
--- autofs-4.1.4-orig/modules/lookup_multi.c 2005-02-10 15:31:29 +0300
+++ autofs-4.1.4/modules/lookup_multi.c 2005-05-08 19:19:19 +0400
@@ -107,7 +107,7 @@
return 0;
nomem:
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_nisplus.c autofs-4.1.4/modules/lookup_nisplus.c
--- autofs-4.1.4-orig/modules/lookup_nisplus.c 2004-12-31 09:30:08 +0300
+++ autofs-4.1.4/modules/lookup_nisplus.c 2005-05-08 19:19:19 +0400
@@ -36,13 +36,14 @@
{
struct lookup_context *ctxt;
- if (!(*context = ctxt = malloc(sizeof(struct lookup_context)))) {
- crit(MODPREFIX "%m");
+ *context = ctxt = malloc(sizeof(struct lookup_context));
+ if (!ctxt) {
+ crit(MODPREFIX "malloc failure");
return 1;
}
if (argc < 1) {
- crit(MODPREFIX "No map name");
+ crit(MODPREFIX "no map name");
return 1;
}
ctxt->mapname = argv[0];
diff -uNr autofs-4.1.4-orig/modules/lookup_program.c autofs-4.1.4/modules/lookup_program.c
--- autofs-4.1.4-orig/modules/lookup_program.c 2004-12-31 09:30:09 +0300
+++ autofs-4.1.4/modules/lookup_program.c 2005-05-08 19:19:19 +0400
@@ -48,7 +48,7 @@
struct lookup_context *ctxt;
if (!(*context = ctxt = malloc(sizeof(struct lookup_context)))) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
@@ -103,7 +103,7 @@
mapent = (char *)malloc(MAPENT_MAX_LEN + 1);
if (!mapent) {
- error(MODPREFIX "malloc: %s\n", strerror(errno));
+ error(MODPREFIX "malloc failure");
return 1;
}
@@ -114,7 +114,7 @@
*/
if (pipe(pipefd)) {
- error(MODPREFIX "pipe: %m");
+ error(MODPREFIX "pipe: %s", strerror(errno));
goto out_free;
}
if (pipe(epipefd)) {
@@ -129,7 +129,7 @@
close(pipefd[1]);
close(epipefd[0]);
close(epipefd[1]);
- error(MODPREFIX "fork: %m");
+ error(MODPREFIX "fork: %s", strerror(errno));
goto out_free;
} else if (f == 0) {
reset_signals();
@@ -204,8 +204,7 @@
++alloci));
if (!tmp) {
alloci--;
- error(MODPREFIX "realloc: %s\n",
- strerror(errno));
+ error(MODPREFIX "realloc failure");
break;
}
mapent = tmp;
@@ -264,7 +263,7 @@
close(epipefd[0]);
if (waitpid(f, &status, 0) != f) {
- error(MODPREFIX "waitpid: %m");
+ error(MODPREFIX "waitpid: %s", strerror(errno));
goto out_free;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_userhome.c autofs-4.1.4/modules/lookup_userhome.c
--- autofs-4.1.4-orig/modules/lookup_userhome.c 2004-12-31 09:30:09 +0300
+++ autofs-4.1.4/modules/lookup_userhome.c 2005-05-08 19:19:19 +0400
@@ -15,6 +15,7 @@
* ----------------------------------------------------------------------- */
#include <stdio.h>
+#include <string.h> /* strerror() */
#include <malloc.h>
#include <errno.h>
#include <pwd.h>
@@ -56,12 +57,12 @@
/* Create the appropriate symlink */
if (chdir(root)) {
- error(MODPREFIX "chdir failed: %m");
+ error(MODPREFIX "chdir failed: %s", strerror(errno));
return 1;
}
if (symlink(pw->pw_dir, name) && errno != EEXIST) {
- error(MODPREFIX "symlink failed: %m");
+ error(MODPREFIX "symlink failed: %s", strerror(errno));
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/lookup_yp.c autofs-4.1.4/modules/lookup_yp.c
--- autofs-4.1.4-orig/modules/lookup_yp.c 2005-02-10 13:59:59 +0300
+++ autofs-4.1.4/modules/lookup_yp.c 2005-05-08 19:19:19 +0400
@@ -55,13 +55,14 @@
struct lookup_context *ctxt;
int err;
- if (!(*context = ctxt = malloc(sizeof(struct lookup_context)))) {
- crit(MODPREFIX "%m");
+ *context = ctxt = malloc(sizeof(struct lookup_context));
+ if (!ctxt) {
+ crit(MODPREFIX "malloc failure");
return 1;
}
if (argc < 1) {
- crit(MODPREFIX "No map name");
+ crit(MODPREFIX "no map name");
return 1;
}
ctxt->mapname = argv[0];
@@ -69,7 +70,7 @@
/* This should, but doesn't, take a const char ** */
err = yp_get_default_domain((char **) &ctxt->domainname);
if (err) {
- crit(MODPREFIX "map %s: %s\n", ctxt->mapname,
+ crit(MODPREFIX "map %s: %s", ctxt->mapname,
yperr_string(err));
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/mount_autofs.c autofs-4.1.4/modules/mount_autofs.c
--- autofs-4.1.4-orig/modules/mount_autofs.c 2005-01-10 16:28:29 +0300
+++ autofs-4.1.4/modules/mount_autofs.c 2005-05-08 19:19:19 +0400
@@ -45,7 +45,7 @@
fullpath = alloca(strlen(root) + name_len + 2);
if (!fullpath) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
sprintf(fullpath, "%s/%s", root, name);
@@ -53,7 +53,7 @@
if (c_options) {
options = alloca(strlen(c_options) + 1);
if (!options) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
strcpy(options, c_options);
@@ -64,7 +64,8 @@
debug(MODPREFIX "calling mkdir_path %s", fullpath);
if (mkdir_path(fullpath, 0555) && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m", name);
+ error(MODPREFIX "mkdir_path %s failed: %s",
+ name, strerror(errno));
return 1;
}
@@ -155,7 +156,7 @@
slave = fork();
if (slave < 0) {
- error(MODPREFIX "fork: %m");
+ error(MODPREFIX "fork: %s", strerror(errno));
goto error;
} else if (slave == 0) {
/* Slave process */
@@ -163,9 +164,11 @@
_exit(255);
}
- while ((wp = waitpid(slave, &status, WUNTRACED)) == -1 && errno == EINTR);
+ while ((wp = waitpid(slave, &status, WUNTRACED)) == -1 && errno == EINTR)
+ /* do nothing */;
+
if (wp != slave) {
- error(MODPREFIX "waitpid: %m");
+ error(MODPREFIX "waitpid: %s", strerror(errno));
goto error;
}
diff -uNr autofs-4.1.4-orig/modules/mount_bind.c autofs-4.1.4/modules/mount_bind.c
--- autofs-4.1.4-orig/modules/mount_bind.c 2005-01-10 16:28:29 +0300
+++ autofs-4.1.4/modules/mount_bind.c 2005-05-08 19:19:19 +0400
@@ -68,7 +68,7 @@
bind_works = 1;
}
- debug(MODPREFIX "bind_works = %d\n", bind_works);
+ debug(MODPREFIX "bind_works = %d", bind_works);
spawnl(LOG_DEBUG,
PATH_UMOUNT, PATH_UMOUNT, "-n", tmp2, NULL);
@@ -91,7 +91,7 @@
fullpath = alloca(strlen(root) + name_len + 2);
if (!fullpath) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
@@ -114,7 +114,8 @@
status = mkdir_path(fullpath, 0555);
if (status && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
+ error(MODPREFIX "mkdir_path %s failed: %s", fullpath,
+ strerror(errno));
return 1;
}
@@ -163,8 +164,8 @@
} else {
debug(MODPREFIX "calling mkdir_path %s", basepath);
if (mkdir_path(basepath, 0555) && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m",
- basepath);
+ error(MODPREFIX "mkdir_path %s failed: %s",
+ basepath, strerror(errno));
return 1;
}
}
diff -uNr autofs-4.1.4-orig/modules/mount_changer.c autofs-4.1.4/modules/mount_changer.c
--- autofs-4.1.4-orig/modules/mount_changer.c 2005-01-09 12:16:43 +0300
+++ autofs-4.1.4/modules/mount_changer.c 2005-05-08 19:19:19 +0400
@@ -57,7 +57,7 @@
fullpath = alloca(strlen(root) + name_len + 2);
if (!fullpath) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
@@ -79,7 +79,8 @@
status = mkdir_path(fullpath, 0555);
if (status && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
+ error(MODPREFIX "mkdir_path %s failed: %s", fullpath,
+ strerror(errno));
return 1;
}
@@ -140,7 +141,7 @@
/* open device */
fd = open(device, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
- error(MODPREFIX "Opening device %s failed : %s",
+ error(MODPREFIX "Opening device %s failed: %s",
device, strerror(errno));
return 1;
}
@@ -149,7 +150,7 @@
total_slots_available = ioctl(fd, CDROM_CHANGER_NSLOTS);
if (total_slots_available <= 1) {
error(MODPREFIX
- "Device %s is not an ATAPI compliant CD changer.\n",
+ "Device %s is not an ATAPI compliant CD changer",
device);
return 1;
}
@@ -164,7 +165,7 @@
/* close device */
status = close(fd);
if (status != 0) {
- error(MODPREFIX "close failed for `%s': %s\n",
+ error(MODPREFIX "close failed for `%s': %s",
device, strerror(errno));
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/mount_ext2.c autofs-4.1.4/modules/mount_ext2.c
--- autofs-4.1.4-orig/modules/mount_ext2.c 2005-01-10 16:28:29 +0300
+++ autofs-4.1.4/modules/mount_ext2.c 2005-05-08 19:19:19 +0400
@@ -49,7 +49,7 @@
fullpath = alloca(strlen(root) + name_len + 2);
if (!fullpath) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
@@ -62,7 +62,8 @@
status = mkdir_path(fullpath, 0555);
if (status && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
+ error(MODPREFIX "mkdir_path %s failed: %s", fullpath,\
+ strerror(errno));
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/mount_generic.c autofs-4.1.4/modules/mount_generic.c
--- autofs-4.1.4-orig/modules/mount_generic.c 2005-01-10 16:28:29 +0300
+++ autofs-4.1.4/modules/mount_generic.c 2005-05-08 19:19:19 +0400
@@ -48,7 +48,7 @@
fullpath = alloca(strlen(root) + name_len + 2);
if (!fullpath) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
@@ -61,7 +61,8 @@
status = mkdir_path(fullpath, 0555);
if (status && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
+ error(MODPREFIX "mkdir_path %s failed: %s", fullpath,
+ strerror(errno));
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/mount_nfs.c autofs-4.1.4/modules/mount_nfs.c
--- autofs-4.1.4-orig/modules/mount_nfs.c 2005-05-08 19:16:37 +0400
+++ autofs-4.1.4/modules/mount_nfs.c 2005-05-08 19:19:19 +0400
@@ -76,7 +76,7 @@
sock = socket(AF_INET, SOCK_DGRAM, udpproto);
if (sock < 0) {
- error(MODPREFIX "socket creation failed: %m");
+ error(MODPREFIX "socket creation failed: %s", strerror(errno));
return -1;
}
@@ -86,14 +86,15 @@
ret = connect(sock, (struct sockaddr *) &src_addr, src_len);
if (ret < 0 ) {
- error(MODPREFIX "connect failed for %s: %m", host);
+ error(MODPREFIX "connect failed for %s: %s",
+ host, strerror(errno));
close(sock);
return 0;
}
ret = getsockname(sock, (struct sockaddr *) &local_addr, &local_len);
if (ret < 0) {
- error(MODPREFIX "getsockname failed: %m");
+ error(MODPREFIX "getsockname failed: %s", strerror(errno));
close(sock);
return 0;
}
@@ -395,7 +396,7 @@
whatstr = alloca(strlen(what) + 1);
if (!whatstr) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
strcpy(whatstr, what);
@@ -435,7 +436,7 @@
#if 0
debug(MODPREFIX "*comma=%x %c comma=%p %s cp=%p %s "
- "nfsoptions=%p nfsp=%p end=%p used=%d len=%d\n",
+ "nfsoptions=%p nfsp=%p end=%p used=%d len=%d",
*comma, *comma, comma, comma, cp, cp,
nfsoptions, nfsp, nfsoptions + len,
nfsp - nfsoptions, len);
@@ -474,7 +475,7 @@
fullpath = alloca(strlen(root) + name_len + 2);
if (!fullpath) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
@@ -501,7 +502,8 @@
status = mkdir_path(fullpath, 0555);
if (status && errno != EEXIST) {
- error(MODPREFIX "mkdir_path %s failed: %m", fullpath);
+ error(MODPREFIX "mkdir_path %s failed: %s", fullpath,
+ strerror(errno));
return 1;
}
diff -uNr autofs-4.1.4-orig/modules/mount_nfs.c.orig autofs-4.1.4/modules/mount_nfs.c.orig
diff -uNr autofs-4.1.4-orig/modules/parse_sun.c autofs-4.1.4/modules/parse_sun.c
--- autofs-4.1.4-orig/modules/parse_sun.c 2005-05-08 19:16:37 +0400
+++ autofs-4.1.4/modules/parse_sun.c 2005-05-08 19:19:19 +0400
@@ -367,7 +367,7 @@
/* Set up context and escape chain */
if (!(ctxt = (struct parse_context *) malloc(sizeof(struct parse_context)))) {
- crit(MODPREFIX "malloc: %m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
*context = (void *) ctxt;
@@ -384,7 +384,7 @@
case 'D':
sv = malloc(sizeof(struct substvar));
if (!sv) {
- error(MODPREFIX "malloc: %m");
+ error(MODPREFIX "malloc failure");
break;
}
if (argv[i][2])
@@ -397,7 +397,7 @@
}
if (!sv->def) {
- error(MODPREFIX "strdup: %m");
+ error(MODPREFIX "strdup failure");
free(sv);
} else {
sv->val = strchr(sv->def, '=');
@@ -462,7 +462,7 @@
}
if (!noptstr) {
kill_context(ctxt);
- crit(MODPREFIX "%m");
+ crit(MODPREFIX "malloc failure");
return 1;
}
ctxt->optstr = noptstr;
@@ -546,7 +546,7 @@
ret = malloc(strlen(left) + strlen(right) + 2);
if (ret == NULL) {
- error(MODPREFIX "concat_options malloc: %m");
+ error(MODPREFIX "concat_options malloc failure");
return NULL;
}
@@ -675,7 +675,7 @@
}
debug(MODPREFIX
- "mounting root %s, mountpoint %s, what %s, fstype %s, options %s\n",
+ "mounting root %s, mountpoint %s, what %s, fstype %s, options %s",
root, mountpoint, what, fstype, options);
/* A malformed entry of the form key /xyz will trigger this case */
@@ -835,7 +835,7 @@
mapent_len = expandsunent(mapent, NULL, name, ctxt->subst, ctxt->slashify_colons);
pmapent = alloca(mapent_len + 1);
if (!pmapent) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
return 1;
}
pmapent[mapent_len] = '\0';
@@ -846,7 +846,7 @@
options = strdup(ctxt->optstr ? ctxt->optstr : "");
if (!options) {
- error(MODPREFIX "strdup: %m");
+ error(MODPREFIX "strdup failure");
return 1;
}
optlen = strlen(options);
@@ -862,7 +862,8 @@
options = concat_options(options, noptions);
if (options == NULL) {
- error(MODPREFIX "concat_options: %m");
+ error(MODPREFIX
+ "concat_options malloc failure");
return 1;
}
p = skipspace(p);
@@ -878,7 +879,7 @@
multi_root = alloca(strlen(root) + name_len + 2);
if (!multi_root) {
- error(MODPREFIX "alloca: %m");
+ error(MODPREFIX "alloca failure");
free(options);
return 1;
}
@@ -893,7 +894,7 @@
char *path, *loc;
if (myoptions == NULL) {
- error(MODPREFIX "multi strdup: %m");
+ error(MODPREFIX "multi strdup failure");
free(options);
multi_free_list(head);
return 1;
@@ -921,7 +922,7 @@
if (myoptions == NULL) {
error(MODPREFIX
- "multi concat_options: %m");
+ "multi concat_options malloc_failure");
free(options);
free(path);
multi_free_list(head);
diff -uNr autofs-4.1.4-orig/modules/parse_sun.c.orig autofs-4.1.4/modules/parse_sun.c.orig