aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix
diff options
context:
space:
mode:
Diffstat (limited to 'ports/unix')
-rw-r--r--ports/unix/guts/chdir.c2
-rw-r--r--ports/unix/guts/chroot.c4
-rw-r--r--ports/unix/guts/dup.c2
-rw-r--r--ports/unix/guts/dup2.c2
-rw-r--r--ports/unix/guts/fchmodat.c2
-rw-r--r--ports/unix/guts/fchown.c6
-rw-r--r--ports/unix/guts/fchownat.c2
-rw-r--r--ports/unix/guts/fopen.c4
-rw-r--r--ports/unix/guts/freopen.c4
-rw-r--r--ports/unix/guts/getcwd.c6
-rw-r--r--ports/unix/guts/getwd.c2
-rw-r--r--ports/unix/guts/mkdirat.c2
-rw-r--r--ports/unix/guts/mkdtemp.c2
-rw-r--r--ports/unix/guts/mkstemp.c2
-rw-r--r--ports/unix/guts/opendir.c2
-rw-r--r--ports/unix/guts/rename.c4
-rw-r--r--ports/unix/guts/renameat.c4
-rw-r--r--ports/unix/guts/rmdir.c2
-rw-r--r--ports/unix/guts/unlinkat.c2
-rw-r--r--ports/unix/pseudo_wrappers.c6
20 files changed, 31 insertions, 31 deletions
diff --git a/ports/unix/guts/chdir.c b/ports/unix/guts/chdir.c
index 59a262f..9e30348 100644
--- a/ports/unix/guts/chdir.c
+++ b/ports/unix/guts/chdir.c
@@ -6,7 +6,7 @@
* wrap_chdir(const char *path) {
* int rc = -1;
*/
- pseudo_debug(2, "chdir: '%s'\n",
+ pseudo_debug(PDBGF_CLIENT, "chdir: '%s'\n",
path ? path : "<nil>");
if (!path) {
diff --git a/ports/unix/guts/chroot.c b/ports/unix/guts/chroot.c
index c5b6f2f..ac24955 100644
--- a/ports/unix/guts/chroot.c
+++ b/ports/unix/guts/chroot.c
@@ -6,9 +6,9 @@
* wrap_chroot(const char *path) {
* int rc = -1;
*/
- pseudo_debug(2, "chroot: %s\n", path);
+ pseudo_debug(PDBGF_CLIENT | PDBGF_CHROOT, "chroot: %s\n", path);
if (!pseudo_client_op(OP_CHROOT, 0, -1, -1, path, 0)) {
- pseudo_debug(1, "chroot failed: %s\n", strerror(errno));
+ pseudo_debug(PDBGF_OP | PDBGF_CHROOT, "chroot failed: %s\n", strerror(errno));
rc = -1;
} else {
rc = 0;
diff --git a/ports/unix/guts/dup.c b/ports/unix/guts/dup.c
index 13612b1..f03c2ad 100644
--- a/ports/unix/guts/dup.c
+++ b/ports/unix/guts/dup.c
@@ -10,7 +10,7 @@
rc = real_dup(fd);
save_errno = errno;
- pseudo_debug(2, "dup: %d->%d\n", fd, rc);
+ pseudo_debug(PDBGF_CLIENT, "dup: %d->%d\n", fd, rc);
pseudo_client_op(OP_DUP, 0, fd, rc, 0, 0);
errno = save_errno;
diff --git a/ports/unix/guts/dup2.c b/ports/unix/guts/dup2.c
index 04666d1..cd335ac 100644
--- a/ports/unix/guts/dup2.c
+++ b/ports/unix/guts/dup2.c
@@ -10,7 +10,7 @@
/* close existing one first - this also causes the socket to the
* server to get moved around if someone tries to overwrite it. */
- pseudo_debug(2, "dup2: %d->%d\n", oldfd, newfd);
+ pseudo_debug(PDBGF_CLIENT, "dup2: %d->%d\n", oldfd, newfd);
pseudo_client_op(OP_CLOSE, 0, newfd, -1, 0, 0);
rc = real_dup2(oldfd, newfd);
save_errno = errno;
diff --git a/ports/unix/guts/fchmodat.c b/ports/unix/guts/fchmodat.c
index 59a92ce..36a8490 100644
--- a/ports/unix/guts/fchmodat.c
+++ b/ports/unix/guts/fchmodat.c
@@ -42,7 +42,7 @@
*/
msg = pseudo_client_op(OP_STAT, 0, -1, -1, path, &buf);
if (!msg || msg->result != RESULT_SUCCEED) {
- pseudo_debug(2, "chmodat to 0%o on %d/%s, ino %llu, new file.\n",
+ pseudo_debug(PDBGF_FILE, "chmodat to 0%o on %d/%s, ino %llu, new file.\n",
mode, dirfd, path, (unsigned long long) buf.st_ino);
}
diff --git a/ports/unix/guts/fchown.c b/ports/unix/guts/fchown.c
index 1514e35..6e33f0f 100644
--- a/ports/unix/guts/fchown.c
+++ b/ports/unix/guts/fchown.c
@@ -12,7 +12,7 @@
if (base_fstat(fd, &buf) == -1) {
save_errno = errno;
- pseudo_debug(2, "fchown failing because fstat failed: %s\n",
+ pseudo_debug(PDBGF_CONSISTENCY, "fchown failing because fstat failed: %s\n",
strerror(errno));
errno = save_errno;
return -1;
@@ -24,7 +24,7 @@
if (msg->result == RESULT_SUCCEED) {
pseudo_stat_msg(&buf, msg);
} else {
- pseudo_debug(2, "fchown fd %d, ino %llu, unknown file.\n",
+ pseudo_debug(PDBGF_FILE, "fchown fd %d, ino %llu, unknown file.\n",
fd, (unsigned long long) buf.st_ino);
}
} else {
@@ -39,7 +39,7 @@
if (group != (gid_t) -1) {
buf.st_gid = group;
}
- pseudo_debug(2, "fchown, fd %d: %d:%d -> %d:%d\n",
+ pseudo_debug(PDBGF_OP, "fchown, fd %d: %d:%d -> %d:%d\n",
fd, owner, group, buf.st_uid, buf.st_gid);
pseudo_client_op(OP_FCHOWN, 0, fd, -1, 0, &buf);
/* pretend we worked, errno should be unchanged */
diff --git a/ports/unix/guts/fchownat.c b/ports/unix/guts/fchownat.c
index 60ccfa5..f976d91 100644
--- a/ports/unix/guts/fchownat.c
+++ b/ports/unix/guts/fchownat.c
@@ -40,7 +40,7 @@
if (msg->result == RESULT_SUCCEED) {
pseudo_stat_msg(&buf, msg);
} else {
- pseudo_debug(2, "chownat to %d:%d on %d/%s, ino %llu, new file.\n",
+ pseudo_debug(PDBGF_FILE, "chownat to %d:%d on %d/%s, ino %llu, new file.\n",
owner, group, dirfd, path,
(unsigned long long) buf.st_ino);
}
diff --git a/ports/unix/guts/fopen.c b/ports/unix/guts/fopen.c
index c7b8da5..de940f5 100644
--- a/ports/unix/guts/fopen.c
+++ b/ports/unix/guts/fopen.c
@@ -16,14 +16,14 @@
if (rc) {
int fd = fileno(rc);
- pseudo_debug(2, "fopen '%s': fd %d <FILE %p>\n", path, fd, (void *) rc);
+ pseudo_debug(PDBGF_OP, "fopen '%s': fd %d <FILE %p>\n", path, fd, (void *) rc);
if (base_fstat(fd, &buf) != -1) {
if (!existed) {
pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf);
}
pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf);
} else {
- pseudo_debug(1, "fopen (fd %d) succeeded, but fstat failed (%s).\n",
+ pseudo_debug(PDBGF_CONSISTENCY, "fopen (fd %d) succeeded, but fstat failed (%s).\n",
fd, strerror(errno));
pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, 0);
}
diff --git a/ports/unix/guts/freopen.c b/ports/unix/guts/freopen.c
index eb788b3..45ca135 100644
--- a/ports/unix/guts/freopen.c
+++ b/ports/unix/guts/freopen.c
@@ -16,14 +16,14 @@
if (rc) {
int fd = fileno(rc);
- pseudo_debug(2, "freopen '%s': fd %d\n", path, fd);
+ pseudo_debug(PDBGF_OP, "freopen '%s': fd %d\n", path, fd);
if (base_fstat(fd, &buf) != -1) {
if (!existed) {
pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf);
}
pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf);
} else {
- pseudo_debug(1, "fopen (fd %d) succeeded, but stat failed (%s).\n",
+ pseudo_debug(PDBGF_OP, "fopen (fd %d) succeeded, but stat failed (%s).\n",
fd, strerror(errno));
pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, 0);
}
diff --git a/ports/unix/guts/getcwd.c b/ports/unix/guts/getcwd.c
index b3f552c..2915a18 100644
--- a/ports/unix/guts/getcwd.c
+++ b/ports/unix/guts/getcwd.c
@@ -6,7 +6,7 @@
* wrap_getcwd(char *buf, size_t size) {
* char * rc = NULL;
*/
- pseudo_debug(3, "wrap_getcwd: %p, %lu\n",
+ pseudo_debug(PDBGF_CLIENT, "wrap_getcwd: %p, %lu\n",
(void *) buf, (unsigned long) size);
if (!pseudo_cwd) {
pseudo_diag("Asked for CWD, but don't have it!\n");
@@ -44,7 +44,7 @@
}
}
if (pseudo_cwd_len - (pseudo_cwd_rel - pseudo_cwd) >= size) {
- pseudo_debug(1, "only %ld bytes available, need %ld (%ld + 1 - %ld)\n",
+ pseudo_debug(PDBGF_CLIENT, "only %ld bytes available, need %ld (%ld + 1 - %ld)\n",
(unsigned long) size,
(unsigned long) pseudo_cwd_len + 1 - pseudo_chroot_len,
(unsigned long) pseudo_cwd_len,
@@ -53,7 +53,7 @@
return NULL;
}
rc = buf;
- pseudo_debug(3, "getcwd: copying %d (%d + 1 - %d) characters from <%s>.\n",
+ pseudo_debug(PDBGF_CLIENT, "getcwd: copying %d (%d + 1 - %d) characters from <%s>.\n",
(int) ((pseudo_cwd_len + 1) - pseudo_chroot_len),
(int) pseudo_cwd_len, (int) pseudo_chroot_len,
pseudo_cwd_rel);
diff --git a/ports/unix/guts/getwd.c b/ports/unix/guts/getwd.c
index 836301e..b1bcf90 100644
--- a/ports/unix/guts/getwd.c
+++ b/ports/unix/guts/getwd.c
@@ -7,7 +7,7 @@
* char * rc = NULL;
*/
- pseudo_debug(3, "getwd (getcwd)\n");
+ pseudo_debug(PDBGF_CLIENT, "getwd (getcwd)\n");
rc = wrap_getcwd(buf, pseudo_path_max());
/* because it would violate everything we have ever known about
* UNIX for these functions to have the same errno semantics,
diff --git a/ports/unix/guts/mkdirat.c b/ports/unix/guts/mkdirat.c
index e846b70..a8fd825 100644
--- a/ports/unix/guts/mkdirat.c
+++ b/ports/unix/guts/mkdirat.c
@@ -27,7 +27,7 @@
if (stat_rc != -1) {
pseudo_client_op(OP_MKDIR, 0, -1, dirfd, path, &buf);
} else {
- pseudo_debug(1, "mkdir of %s succeeded, but stat failed: %s\n",
+ pseudo_debug(PDBGF_OP, "mkdir of %s succeeded, but stat failed: %s\n",
path, strerror(errno));
}
}
diff --git a/ports/unix/guts/mkdtemp.c b/ports/unix/guts/mkdtemp.c
index 194f0cb..5ef647b 100644
--- a/ports/unix/guts/mkdtemp.c
+++ b/ports/unix/guts/mkdtemp.c
@@ -32,7 +32,7 @@
if (base_stat(rc, &buf) != -1) {
pseudo_client_op(OP_CREAT, 0, -1, -1, tmp_template, &buf);
} else {
- pseudo_debug(1, "mkdtemp (path %s) succeeded, but fstat failed (%s).\n",
+ pseudo_debug(PDBGF_CONSISTENCY, "mkdtemp (path %s) succeeded, but fstat failed (%s).\n",
rc, strerror(errno));
}
errno = save_errno;
diff --git a/ports/unix/guts/mkstemp.c b/ports/unix/guts/mkstemp.c
index 2ad3f19..1f055fd 100644
--- a/ports/unix/guts/mkstemp.c
+++ b/ports/unix/guts/mkstemp.c
@@ -33,7 +33,7 @@
pseudo_client_op(OP_CREAT, 0, -1, -1, tmp_template, &buf);
pseudo_client_op(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, &buf);
} else {
- pseudo_debug(1, "mkstemp (fd %d) succeeded, but fstat failed (%s).\n",
+ pseudo_debug(PDBGF_CONSISTENCY, "mkstemp (fd %d) succeeded, but fstat failed (%s).\n",
rc, strerror(errno));
pseudo_client_op(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, 0);
}
diff --git a/ports/unix/guts/opendir.c b/ports/unix/guts/opendir.c
index 31f5738..c8a78f8 100644
--- a/ports/unix/guts/opendir.c
+++ b/ports/unix/guts/opendir.c
@@ -15,7 +15,7 @@
save_errno = errno;
fd = dirfd(rc);
if (base_fstat(fd, &buf) == -1) {
- pseudo_debug(1, "diropen (fd %d) succeeded, but fstat failed (%s).\n",
+ pseudo_debug(PDBGF_CONSISTENCY, "diropen (fd %d) succeeded, but fstat failed (%s).\n",
fd, strerror(errno));
pseudo_client_op(OP_OPEN, PSA_READ, fd, -1, path, 0);
} else {
diff --git a/ports/unix/guts/rename.c b/ports/unix/guts/rename.c
index 1473a8d..ad28293 100644
--- a/ports/unix/guts/rename.c
+++ b/ports/unix/guts/rename.c
@@ -12,7 +12,7 @@
int save_errno;
int old_db_entry = 0;
- pseudo_debug(2, "rename: %s->%s\n",
+ pseudo_debug(PDBGF_OP, "rename: %s->%s\n",
oldpath ? oldpath : "<nil>",
newpath ? newpath : "<nil>");
@@ -84,7 +84,7 @@
oldbuf.st_ino = newbuf.st_ino;
}
}
- pseudo_debug(1, "creating new '%s' [%llu] to rename\n",
+ pseudo_debug(PDBGF_FILE, "creating new '%s' [%llu] to rename\n",
oldpath, (unsigned long long) oldbuf.st_ino);
pseudo_client_op(OP_LINK, 0, -1, -1, oldpath, &oldbuf);
}
diff --git a/ports/unix/guts/renameat.c b/ports/unix/guts/renameat.c
index d8138bb..ade0509 100644
--- a/ports/unix/guts/renameat.c
+++ b/ports/unix/guts/renameat.c
@@ -12,7 +12,7 @@
int save_errno;
int old_db_entry = 0;
- pseudo_debug(2, "renameat: %d,%s->%d,%s\n",
+ pseudo_debug(PDBGF_FILE, "renameat: %d,%s->%d,%s\n",
olddirfd, oldpath ? oldpath : "<nil>",
newdirfd, newpath ? newpath : "<nil>");
@@ -96,7 +96,7 @@
oldbuf.st_ino = newbuf.st_ino;
}
}
- pseudo_debug(1, "creating new '%s' [%llu] to rename\n",
+ pseudo_debug(PDBGF_OP, "creating new '%s' [%llu] to rename\n",
oldpath, (unsigned long long) oldbuf.st_ino);
pseudo_client_op(OP_LINK, 0, -1, olddirfd, oldpath, &oldbuf);
}
diff --git a/ports/unix/guts/rmdir.c b/ports/unix/guts/rmdir.c
index a47e01c..ebc522a 100644
--- a/ports/unix/guts/rmdir.c
+++ b/ports/unix/guts/rmdir.c
@@ -28,7 +28,7 @@
pseudo_client_op(OP_DID_UNLINK, 0, -1, -1, path, &buf);
}
} else {
- pseudo_debug(1, "rmdir on <%s>, not in database, no effect.\n", path);
+ pseudo_debug(PDBGF_FILE, "rmdir on <%s>, not in database, no effect.\n", path);
}
/* return rc;
diff --git a/ports/unix/guts/unlinkat.c b/ports/unix/guts/unlinkat.c
index bd51b09..e723a01 100644
--- a/ports/unix/guts/unlinkat.c
+++ b/ports/unix/guts/unlinkat.c
@@ -53,7 +53,7 @@
pseudo_client_op(OP_DID_UNLINK, 0, -1, -1, path, &buf);
}
} else {
- pseudo_debug(1, "unlink on <%s>, not in database, no effect.\n", path);
+ pseudo_debug(PDBGF_FILE, "unlink on <%s>, not in database, no effect.\n", path);
}
/* return rc;
diff --git a/ports/unix/pseudo_wrappers.c b/ports/unix/pseudo_wrappers.c
index dddb1ec..b825d56 100644
--- a/ports/unix/pseudo_wrappers.c
+++ b/ports/unix/pseudo_wrappers.c
@@ -10,7 +10,7 @@ popen(const char *command, const char *mode) {
return rc;
}
- pseudo_debug(4, "called: popen\n");
+ pseudo_debug(PDBGF_WRAPPER, "called: popen\n");
pseudo_sigblock(&saved);
if (pseudo_getlock()) {
errno = EBUSY;
@@ -30,9 +30,9 @@ popen(const char *command, const char *mode) {
/* This can cause hangs on some recentish systems which use locale
* stuff for strerror...
*/
- pseudo_debug(4, "completed: popen (maybe: %s)\n", strerror(save_errno));
+ pseudo_debug(PDBGF_WRAPPER, "completed: popen (maybe: %s)\n", strerror(save_errno));
#endif
- pseudo_debug(4, "completed: popen (errno: %d)\n", save_errno);
+ pseudo_debug(PDBGF_WRAPPER, "completed: popen (errno: %d)\n", save_errno);
errno = save_errno;
return rc;
}