Made SetVolumeLabel report failure on CD-ROM drives.

This commit is contained in:
Ove Kaaven 2000-01-15 23:28:26 +00:00 committed by Alexandre Julliard
parent 8362da1538
commit a01e289696
1 changed files with 22 additions and 3 deletions

View File

@ -1267,9 +1267,28 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label,
/***********************************************************************
* SetVolumeLabelA (KERNEL32.675)
*/
BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname)
BOOL WINAPI SetVolumeLabelA( LPCSTR root, LPCSTR volname )
{
FIXME("(%s,%s),stub!\n",rootpath,volname);
int drive;
/* FIXME, SetLastErrors missing */
if (!root) drive = DRIVE_GetCurrentDrive();
else
{
if ((root[1]) && (root[1] != ':'))
{
WARN("invalid root '%s'\n",root);
return FALSE;
}
drive = toupper(root[0]) - 'A';
}
if (!DRIVE_IsValid( drive )) return FALSE;
/* some copy protection stuff check this */
if (DRIVE_GetType( drive ) == TYPE_CDROM) return FALSE;
FIXME("(%s,%s),stub!\n", root, volname);
return TRUE;
}