Using uname() rather than #ifdef __FreeBSD__
This commit is contained in:
@ -8421,10 +8421,10 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
|
||||
char *adr_value, char *cmd, int flag)
|
||||
{
|
||||
int ret, lba, track, session, params_flag= 0, is_safe= 0, is_extra_drive= 0;
|
||||
int give_up= 0;
|
||||
int give_up= 0, mount_chardev= 0;
|
||||
char volid[33], *devadr, mount_command[SfileadrL], adr_data[163], *adr_pt;
|
||||
char *dev_path, libburn_adr[BURN_DRIVE_ADR_LEN + SfileadrL];
|
||||
char sfe[5 * SfileadrL], *dpt;
|
||||
char sfe[5 * SfileadrL], *dpt, *sysname= "";
|
||||
struct stat stbuf;
|
||||
struct burn_drive_info *dinfo= NULL;
|
||||
struct burn_drive *drive= NULL;
|
||||
@ -8466,7 +8466,11 @@ int Xorriso_mount(struct XorrisO *xorriso, char *dev, int adr_mode,
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
if(!(S_ISREG(stbuf.st_mode) || S_ISBLK(stbuf.st_mode))) {
|
||||
ret= System_uname(&sysname, NULL, NULL, NULL, 0);
|
||||
if(ret > 0 && strcmp(sysname, "FreeBSD") == 0)
|
||||
mount_chardev= 1;
|
||||
if(!(S_ISREG(stbuf.st_mode) || (S_ISBLK(stbuf.st_mode) && !mount_chardev)
|
||||
|| (S_ISCHR(stbuf.st_mode) && !mount_chardev))) {
|
||||
sprintf(xorriso->info_text,
|
||||
"File object is not suitable as mount device: %s",
|
||||
Text_shellsafe(dev_path, sfe, 0));
|
||||
|
Reference in New Issue
Block a user