lkml.org 
[lkml]   [1999]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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;
}
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.046 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site