There isn't a specific format specifier for dev_t
(aka __dev_t
), but it should be an integer type of some kind. If you follow the rabbit hole of typedefs and defines in the standard header files you should eventually reach the base definition for the type. On my system the chain is:
typedef __dev_t dev_t;
__STD_TYPE __DEV_T_TYPE __dev_t;
#define __DEV_T_TYPE __UQUAD_TYPE
#define __UQUAD_TYPE __u_quad_t
__extension__ typedef unsigned long long int __u_quad_t;
Therefore %lu
would work. It may be different on your system, but chances are it is something similar to unsigned long int. It's usually helpful to investigate these things when you encounter them, you never know what you might learn about how things work under the hood.