Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
418e27ea
Commit
418e27ea
authored
Jan 09, 2001
by
Ryan Cumming
Committed by
Alexandre Julliard
Jan 09, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make CDROM_GetLabel return 0 in the event of failure, and make the
default label for drives a string of 11 spaces.
parent
8767ee3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
drive.c
files/drive.c
+1
-1
cdrom.c
misc/cdrom.c
+5
-7
No files found.
files/drive.c
View file @
418e27ea
...
...
@@ -189,7 +189,7 @@ int DRIVE_Init(void)
drive
->
ino
=
drive_stat_buffer
.
st_ino
;
/* Get the drive label */
PROFILE_GetWineIniString
(
name
,
"Label"
,
name
,
drive
->
label_conf
,
12
);
PROFILE_GetWineIniString
(
name
,
"Label"
,
""
,
drive
->
label_conf
,
12
);
if
((
len
=
strlen
(
drive
->
label_conf
))
<
11
)
{
/* Pad label with spaces */
...
...
misc/cdrom.c
View file @
418e27ea
...
...
@@ -779,8 +779,6 @@ end:
return
serial
;
}
static
const
char
empty_label
[]
=
" "
;
/**************************************************************************
* CDROM_Data_GetLabel [internal]
*/
...
...
@@ -822,13 +820,12 @@ DWORD CDROM_Data_GetLabel(WINE_CDAUDIO* wcda, char *label, int parentdev)
strncpy
(
label
,
(
LPSTR
)
label_read
,
11
);
label
[
11
]
=
'\0'
;
}
return
0
;
return
1
;
}
}
failure:
CDROM_CLOSE
(
dev
,
parentdev
);
ERR
(
"error reading label !
\n
"
);
strcpy
(
label
,
empty_label
);
return
0
;
}
...
...
@@ -866,22 +863,23 @@ DWORD CDROM_GetLabel(int drive, char *label)
/* common code *here* !! */
/* hopefully a data CD */
CDROM_Data_GetLabel
(
&
wcda
,
label
,
dev
);
if
(
!
CDROM_Data_GetLabel
(
&
wcda
,
label
,
dev
))
ret
=
0
;
break
;
case
CDS_MIXED
:
cdname
=
"Mixed mode"
;
ERR
(
"We don't have a way of determining the label of a mixed mode CD - Linux doesn't allow raw access !!
\n
"
);
/* fall through */
case
CDS_NO_INFO
:
if
(
!
cdname
)
cdname
=
"No_info"
;
strcpy
(
label
,
empty_label
)
;
ret
=
0
;
break
;
default:
WARN
(
"Strange CD type (%d) or empty ?
\n
"
,
media
);
cdname
=
"Strange/empty"
;
strcpy
(
label
,
empty_label
);
ret
=
0
;
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment