Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 296298 Details for
Bug 432729
execute command "eject -X" can not output a list of speeds of "cdrom"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
This is a patch fixing this bug in the source of "eject-2.1.5-5.el5.src.rpm"
eject_X.patch (text/plain), 2.20 KB, created by
Peng Haitao
on 2008-02-29 01:46:04 UTC
(
hide
)
Description:
This is a patch fixing this bug in the source of "eject-2.1.5-5.el5.src.rpm"
Filename:
MIME Type:
Creator:
Peng Haitao
Created:
2008-02-29 01:46:04 UTC
Size:
2.20 KB
patch
obsolete
>diff -Nurp eject.orig/eject.c eject/eject.c >--- eject.orig/eject.c 2009-03-06 21:10:17.000000000 +0800 >+++ eject/eject.c 2009-03-06 21:20:29.000000000 +0800 >@@ -603,7 +603,7 @@ static void ToggleTray(int fd) > * Thanks to Roland Krivanek (krivanek@fmph.uniba.sk) > * http://dmpc.dbp.fmph.uniba.sk/~krivanek/cdrom_speed/ > */ >-static void SelectSpeedCdrom(int fd, int speed) >+static int SelectSpeedCdrom(int fd, int speed, int exit_on_error) > { > unsigned long rw_size; > unsigned char buffer[28]; >@@ -660,13 +660,17 @@ static void SelectSpeedCdrom(int fd, int > > if(ioctl(fd, CDROM_SEND_PACKET, &cgc) != 0) { > if(ioctl(fd, CDROM_SELECT_SPEED, speed) != 0) { >- fprintf(stderr, _("%s: CD-ROM select speed command failed: %s\n"), programName, strerror(errno)); >- exit(1); >+ if (exit_on_error) { >+ fprintf(stderr, _("%s: CD-ROM select speed command failed: %s\n"), programName, strerror(errno)); >+ exit(1); >+ } else >+ return 1; > } > } > #else >- fprintf(stderr, _("%s: CD-ROM select speed command not supported by this kernel\n"), programName); >+ fprintf(stderr, _("%s: CD-ROM select speed command not supported by this kernel\n"), programName); > #endif >+ return 0; > } > > /* >@@ -729,14 +733,18 @@ static int ReadSpeedCdrom(const char *sh > static void ListSpeedCdrom(const char *fullName, int fd) > { > #ifdef CDROM_SELECT_SPEED >- int max_speed, curr_speed = 0, prev_speed; >+ int max_speed, curr_speed = 0, prev_speed, err; > char *shortName = rindex(fullName, '/') + 1; > >- SelectSpeedCdrom(fd, 0); >+ SelectSpeedCdrom(fd, 0, 1); > max_speed = ReadSpeedCdrom(shortName); > while (curr_speed < max_speed) { > prev_speed = curr_speed; >- SelectSpeedCdrom(fd, prev_speed + 1); >+ err = SelectSpeedCdrom(fd, prev_speed + 1, 0); >+ if (err) { >+ curr_speed = prev_speed + 1; >+ continue; >+ } > curr_speed = ReadSpeedCdrom(shortName); > if (curr_speed > prev_speed) > printf("%d ", curr_speed); >@@ -1147,7 +1155,7 @@ static void HandleXOption(char *deviceNa > printf(_("%s: setting CD-ROM speed to %dX\n"), programName, x_arg); > } > fd = OpenDevice(deviceName); >- SelectSpeedCdrom(fd, x_arg); >+ SelectSpeedCdrom(fd, x_arg, 1); > exit(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 432729
:
294862
|
294961
|
294962
|
294998
|
295119
|
296204
| 296298 |
297128