The Samba-Bugzilla – Attachment 6626 Details for
Bug 8265
Various corruption of devices and sockets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add debug output for the rdev major corruption
rdev-major-debug-8265.diff (text/plain), 3.17 KB, created by
Matt McCutchen
on 2011-06-25 22:18:05 UTC
(
hide
)
Description:
Add debug output for the rdev major corruption
Filename:
MIME Type:
Creator:
Matt McCutchen
Created:
2011-06-25 22:18:05 UTC
Size:
3.17 KB
patch
obsolete
>diff --git a/flist.c b/flist.c >index 7102b5b..f9df9b0 100644 >--- a/flist.c >+++ b/flist.c >@@ -452,6 +452,7 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, > } > } else if (protocol_version < 28) > rdev = MAKEDEV(0, 0); >+ rprintf(FINFO, "DEBUG 1: send_file_entry(%s): major(rdev) = %d\n", fname, major(rdev)); > if (!preserve_uid || ((uid_t)F_OWNER(file) == uid && *lastname)) > xflags |= XMIT_SAME_UID; > else { >@@ -577,8 +578,12 @@ static void send_file_entry(int f, const char *fname, struct file_struct *file, > if (!(xflags & XMIT_SAME_RDEV_pre28)) > write_int(f, (int)rdev); > } else { >- if (!(xflags & XMIT_SAME_RDEV_MAJOR)) >+ if (!(xflags & XMIT_SAME_RDEV_MAJOR)) { >+ rprintf(FINFO, "DEBUG 2: send_file_entry(%s): send major %d\n", fname, major(rdev)); > write_varint30(f, major(rdev)); >+ } else { >+ rprintf(FINFO, "DEBUG 3: send_file_entry(%s): XMIT_SAME_RDEV_MAJOR\n", fname); >+ } > if (protocol_version >= 30) > write_varint(f, minor(rdev)); > else if (xflags & XMIT_RDEV_MINOR_8_pre30) >@@ -738,6 +743,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x > if (preserve_devices && IS_DEVICE(mode)) { > uint32 *devp = F_RDEV_P(first); > rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp)); >+ rprintf(FINFO, "DEBUG 4: recv_file_entry(%s): took major(rdev) = %d from previous file %s\n", thisname, major(rdev), f_name(first, NULL)); > extra_len += DEV_EXTRA_CNT * EXTRA_LEN; > } > if (preserve_links && S_ISLNK(mode)) >@@ -800,8 +806,12 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x > rdev = (dev_t)read_int(f); > } else { > uint32 rdev_minor; >- if (!(xflags & XMIT_SAME_RDEV_MAJOR)) >+ if (!(xflags & XMIT_SAME_RDEV_MAJOR)) { > rdev_major = read_varint30(f); >+ rprintf(FINFO, "DEBUG 5: recv_file_entry(%s): read rdev_major %d\n", thisname, rdev_major); >+ } else { >+ rprintf(FINFO, "DEBUG 6: recv_file_entry(%s): XMIT_SAME_RDEV_MAJOR, rdev_major was %d\n", thisname, rdev_major); >+ } > if (protocol_version >= 30) > rdev_minor = read_varint(f); > else if (xflags & XMIT_RDEV_MINOR_8_pre30) >@@ -815,6 +825,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x > file_length = 0; > } else if (protocol_version < 28) > rdev = MAKEDEV(0, 0); >+ rprintf(FINFO, "DEBUG 7: recv_file_entry(%s): after assembly, major(rdev) = %d\n", thisname, major(rdev)); > > #ifdef SUPPORT_LINKS > if (preserve_links && S_ISLNK(mode)) { >@@ -956,6 +967,7 @@ static struct file_struct *recv_file_entry(int f, struct file_list *flist, int x > uint32 *devp = F_RDEV_P(file); > DEV_MAJOR(devp) = major(rdev); > DEV_MINOR(devp) = minor(rdev); >+ rprintf(FINFO, "DEBUG 8: recv_file_entry(%s): DEV_MAJOR(F_RDEV_P(file)) = %d\n", thisname, DEV_MAJOR(F_RDEV_P(file))); > } > > #ifdef SUPPORT_LINKS >@@ -1268,6 +1280,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist, > #ifdef HAVE_STRUCT_STAT_ST_RDEV > if (IS_DEVICE(st.st_mode)) { > tmp_rdev = st.st_rdev; >+ rprintf(FINFO, "DEBUG 9: make_file(%s): major(tmp_rdev) = %d\n", fname, major(tmp_rdev)); > st.st_size = 0; > } else if (IS_SPECIAL(st.st_mode)) > st.st_size = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8265
: 6626