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 595770 Details for
Bug 604181
[PATCH] Xen guest install from CD fails due to CD not found
[?]
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.
test program, to be run in PV guest
checkcd.c (text/x-c), 1.78 KB, created by
Laszlo Ersek
on 2012-07-02 16:44:46 UTC
(
hide
)
Description:
test program, to be run in PV guest
Filename:
MIME Type:
Creator:
Laszlo Ersek
Created:
2012-07-02 16:44:46 UTC
Size:
1.78 KB
patch
obsolete
>/* > Copyright (C) 2012 Red Hat Inc. > Written by Laszlo Ersek <lersek@redhat.com> > GPLv3+ > > Compile with > gcc -o checkcd -std=c99 -ansi -pedantic -Wall -Wextra checkcd.c >*/ > >#define _XOPEN_SOURCE 600 > >#include <stdlib.h> /* EXIT_FAILURE */ >#include <string.h> /* strrchr() */ >#include <stdio.h> /* fprintf() */ >#include <fcntl.h> /* open() */ >#include <errno.h> /* errno */ >#include <unistd.h> /* close() */ > >/* Linux/glibc-specific */ >#include <sys/ioctl.h> /* ioctl() */ >#include <linux/cdrom.h> /* CDROM_GET_CAPABILITY */ > >static const char *pname; > >int >main(int argc, char **argv) >{ > int ret; > > ret = EXIT_FAILURE; > pname = strrchr(argv[0], '/'); > pname = pname ? pname + 1 : argv[0]; > > if (2 != argc) { > (void)fprintf(stderr, "%s: pathname of CD-ROM device node required as" > " sole argument\n", pname); > } > else { > int fd; > > fd = open(argv[1], O_RDONLY | O_NOCTTY); > if (-1 == fd) { > (void)fprintf(stderr, "%s: open(\"%s\"): %s\n", pname, argv[1], > strerror(errno)); > } > else { > int caps; > > caps = ioctl(fd, CDROM_GET_CAPABILITY); > if (-1 == caps) { > (void)fprintf(stderr, "%s: ioctl(\"%s\"): %s\n", pname, argv[1], > strerror(errno)); > } > else { > (void)fprintf(stdout, "%s: capabilities for \"%s\": 0x%08X\n", pname, > argv[1], (unsigned)caps); > > if (EOF == fflush(stdout)) { > (void)fprintf(stderr, "%s: fflush(stdout): %s\n", pname, > strerror(errno)); > } > else { > ret = EXIT_SUCCESS; > } > } > > if (-1 == close(fd) && EXIT_SUCCESS == ret) { > (void)fprintf(stderr, "%s: close(\"%s\"): %s\n", pname, argv[1], > strerror(errno)); > ret = EXIT_FAILURE; > } > } > } > return ret; >}
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 Raw
Actions:
View
Attachments on
bug 604181
:
424179
|
595765
|
595770
|
595806