diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 74019fc..a74914f 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.06.08.174946" +#define Cdrskin_timestamP "2010.06.08.200313" diff --git a/libburn/sg-libcdio.c b/libburn/sg-libcdio.c index 53736e3..981e52a 100644 --- a/libburn/sg-libcdio.c +++ b/libburn/sg-libcdio.c @@ -918,7 +918,24 @@ int burn_os_stdio_capacity(char *path, off_t *bytes) return -2; *bytes = add_size; -#endif/* Libburn_is_on_freebsD */ +#endif /* Libburn_is_on_freebsD */ + +#ifdef Libburn_is_on_solariS + + } else if(S_ISBLK(stbuf.st_mode)) { + int open_mode = O_RDONLY, fd; + + fd = open(path, open_mode); + if (fd == -1) + return -2; + *bytes = lseek(fd, 0, SEEK_END); + close(fd); + if (*bytes == -1) { + *bytes = 0; + return 0; + } + +#endif /* Libburn_is_on_solariS */ } else if(S_ISREG(stbuf.st_mode)) { add_size = stbuf.st_blocks * (off_t) 512; diff --git a/libburn/sg-solaris.c b/libburn/sg-solaris.c index 081f636..9f66999 100644 --- a/libburn/sg-solaris.c +++ b/libburn/sg-solaris.c @@ -801,30 +801,18 @@ int burn_os_stdio_capacity(char *path, off_t *bytes) if (stat(testpath, &stbuf) == -1) return -1; -#ifdef __linux - - /* GNU/Linux specific determination of block device size */ } else if(S_ISBLK(stbuf.st_mode)) { - int open_mode = O_RDONLY, fd, ret; + int open_mode = O_RDONLY, fd; fd = open(path, open_mode); if (fd == -1) return -2; - ret = ioctl(fd, BLKGETSIZE, &blocks); + *bytes = lseek(fd, 0, SEEK_END); close(fd); - if (ret == -1) - return -2; - *bytes = ((off_t) blocks) * (off_t) 512; - -#endif /* __linux */ - - - /* >>> ioctl to determine capacity of block device - ? DKIOCGEXTVTOC , man dkio ? - ? DKIOCEXTPARTINFO , - struct extpart_info.p_length * 512, man dkio ? - */; - + if (*bytes == -1) { + *bytes = 0; + return 0; + } } else if(S_ISREG(stbuf.st_mode)) { add_size = stbuf.st_blocks * (off_t) 512;