FreeBSD Bugzilla – Attachment 11520 Details for
Bug 22664
[PATCH] mounting an audio CD causes kernel panic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 947 bytes, created by
George Reid
on 2000-11-07 18:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
George Reid
Created:
2000-11-07 18:30:01 UTC
Size:
947 bytes
patch
obsolete
>--- mount_cd9660.c.orig Tue Nov 7 01:01:42 2000 >+++ mount_cd9660.c Tue Nov 7 18:17:13 2000 >@@ -145,6 +145,11 @@ > args.export.ex_root = DEFAULT_ROOTUID; > args.flags = opts; > >+ switch(is_medium_data(dev)) { >+ case -1: errx(EX_OSERR, "error reading medium type!"); >+ case 0: errx(EX_DATAERR, "medium type is not data!"); >+ } >+ > if (args.ssector == -1) { > /* > * The start of the session has not been specified on >@@ -228,4 +233,28 @@ > return -1; > > return ntohl(toc_buffer[i].addr.lba); >+} >+ >+int >+is_medium_data(const char *dev) >+{ >+ struct ioc_medium m; >+ int fd; >+ >+ if ((fd = open(dev, O_RDONLY)) == -1) >+ return -1; >+ if (ioctl(fd, CDIOCGETMEDIUM, &m) == -1) { >+ perror("ioctl"); >+ close(fd); >+ return -1; >+ } >+ close(fd); >+ switch (m.medium_type & MST_TYPE_MASK_LOW) >+ { >+ case MST_DATA_120: return(1); >+ case MST_COMB_120: return(1); >+ case MST_DATA_80: return(1); >+ case MST_COMB_80: return(1); >+ } >+ return(0); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22664
:
11518
|
11519
| 11520