Adaptions to FreeBSD. Thanks to J.R. Oldroyd.
This commit is contained in:
parent
1bb20c2b5d
commit
2787932886
@ -89,6 +89,7 @@ or
|
||||
#include <utime.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* for -charset */
|
||||
#include <iconv.h>
|
||||
@ -7842,7 +7843,7 @@ int Xorriso__mode_to_perms(mode_t st_mode, char perms[10], int flag)
|
||||
*/
|
||||
int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag)
|
||||
{
|
||||
int show_major_minor= 0;
|
||||
int show_major_minor= 0, high_shift= 0, high_mask= 0;
|
||||
char *rpt, perms[10], mm_text[80];
|
||||
mode_t st_mode;
|
||||
dev_t dev, major, minor;
|
||||
@ -7883,8 +7884,15 @@ int Xorriso_format_ls_l(struct XorrisO *xorriso, struct stat *stbuf, int flag)
|
||||
dev= stbuf->st_rdev;
|
||||
|
||||
/* according to /usr/include/sys/sysmacros.h : gnu_dev_major(),_minor()
|
||||
>>> but this looks should go to some system dependency */
|
||||
major= (((dev >> 8) & 0xfff) | ((unsigned int) (dev >> 32) & ~0xfff))
|
||||
>>> but this looks as if it should go to some system dependency
|
||||
>>> in FreeBSD dev_t is 32 bit
|
||||
*/
|
||||
if(sizeof(dev_t) > 4) {
|
||||
high_shift= 32;
|
||||
high_mask= ~0xfff;
|
||||
}
|
||||
major= (((dev >> 8) & 0xfff) |
|
||||
((unsigned int) (dev >> high_shift) & high_mask))
|
||||
& 0xffffffff;
|
||||
minor= (((dev & 0xff) | ((unsigned int) (dev >> 12) & ~0xff))) & 0xffffffff;
|
||||
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.11.12.153437"
|
||||
#define Xorriso_timestamP "2008.11.15.133724"
|
||||
|
Loading…
Reference in New Issue
Block a user