Lines Matching refs:stbuf
119 static int CheckDrive(char *drive, char *mnttype, struct stat *stbuf)
125 if ( stat(drive, stbuf) < 0 ) {
131 if ( S_ISCHR(stbuf->st_mode) || S_ISBLK(stbuf->st_mode) ) {
154 static void AddDrive(char *drive, struct stat *stbuf)
163 if ( stbuf->st_rdev == SDL_cdmode[i] ) {
178 SDL_cdmode[i] = stbuf->st_rdev;
191 struct stat stbuf;
247 if (CheckDrive(mnt_dev, mnt_type, &stbuf) > 0) {
248 AddDrive(mnt_dev, &stbuf);
268 struct stat stbuf;
299 if ( CheckDrive(SDLcdrom, NULL, &stbuf) > 0 ) {
300 AddDrive(SDLcdrom, &stbuf);
319 if (CheckDrive("/dev/cdrom", NULL, &stbuf) > 0) {
320 AddDrive("/dev/cdrom", &stbuf);
351 switch (CheckDrive(drive, NULL, &stbuf)) {
354 AddDrive(drive, &stbuf);
370 if ( CheckDrive(drive, NULL, &stbuf) > 0 ) {
371 AddDrive(drive, &stbuf);