Messages in this thread | | | Date | Thu, 18 Nov 1999 08:29:01 +0000 (GMT) | From | Tigran Aivazian <> | Subject | Re: 2.3.28 bugs and things to do. |
| |
Hi,
The HDIO_GETGEO ioctl on /dev/sda3 causes the message. Attached is the simple program that reproduces the problem - no need to run lilo.
Regards, Tigran.
#include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <string.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h>
#define HDIO_GETGEO 0x0301
struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; } geo;
int main(int argc, char *argv[]) { int fd;
if (argc != 2) { fprintf(stderr, "usage: %s [dev]\n", argv[0]); exit(1); } fd = open(argv[1], O_RDWR); if (fd == -1) { fprintf(stderr, "open(%s), errno=%d (%s)\n", argv[1], errno, strerror(errno)); exit(1); } if (ioctl(fd, HDIO_GETGEO, &geo) == -1) { fprintf(stderr, "ioctl(HDIO_GETGEO), errno=%d (%s)\n", errno, strerror(errno)); exit(1); } (void)close(fd); return 0; }
| |