Created attachment 87806 [details] [review] Support printing unix file descriptors in dbus-send/dbus-monitor dbus-send doesn't print unix file descriptor types, i.e.: $ dbus-send --system --dest=org.freedesktop.login1 --print-reply /org/freedesktop/login1 org.freedesktop.login1.Manager.Inhibit string:'handle-power-key' string:'bob' string:'Blah blah' string:'block' method return sender=:1.2 -> dest=:1.116 reply_serial=2 (dbus-monitor too dumb to decipher arg type 'h') type 'h' is a Unix file descriptor.
Comment on attachment 87806 [details] [review] Support printing unix file descriptors in dbus-send/dbus-monitor Review of attachment 87806 [details] [review]: ----------------------------------------------------------------- ::: tools/dbus-print-message.c @@ +349,5 @@ > + > + case DBUS_TYPE_UNIX_FD: > + { > + dbus_uint32_t val; > + dbus_message_iter_get_basic (iter, &val); I think the libdbus ABI is that it's an int, not a dbus_uint32_t, on platforms where that makes a difference (but please check the source code, I could be wrong). (I know it's a uint32 in the wire protocol, but the uint32 doesn't numerically equal the fd anyway.)
Created attachment 87900 [details] [review] Support printing unix file descriptors in dbus-send/dbus-monitor Thanks for catching that! Looking in dbus/dbus-message.c it does indeed special case unix file descriptors and actually do the conversion from the u32 index into a file descriptor (int).
Comment on attachment 87900 [details] [review] Support printing unix file descriptors in dbus-send/dbus-monitor Review of attachment 87900 [details] [review]: ----------------------------------------------------------------- looks good.
patch applied, so mark it as fixed.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.