-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Jens! Thanks for the sample code. I've trimmed the recipient list a bit... Jens Axboe wrote: > Perhaps the IDLE or IDLEIMMEDIATE commands imply a head parking, that > would make sense. As you say, you can hear a drive parking its head. > Here's a test case, it doesn't sound like it's parking the hard here. Not here either, but let me check, if I understand this correctly: > #include <stdio.h> > #include <unistd.h> > #include <fcntl.h> > #include <sys/ioctl.h> > #include <linux/hdreg.h> > > int main(int argc, char *argv[]) > { > char cmd[4] = { 0xe1, 0, 0, 0 }; The "0xe1" in here is what is defined as "WIN_IDLEIMMEDIATE" in hdreg.h, correct? > int fd; > > if (argc < 2) { > printf("%s <dev>\n", argv[0]); > return 1; > } > > fd = open(argv[1], O_RDONLY); Hmm, don't I need to actually have *write* access for sending an ioctl? > if (fd == -1) { > perror("open"); > return 1; > } > > if (ioctl(fd, HDIO_DRIVE_CMD, cmd)) > perror("ioctl"); > > close(fd); > return 0; > } I will give it another try, after clarifying the above questions - maybe there is a command that will perform the desired task. If not, I guess we're back at snooping what the Windows driver does here... Bye, LenZ - -- - ------------------------------------------------------------------ Lenz Grimmer <[email protected]> -o) [ICQ: 160767607 | Jabber: [email protected]] /\\ http://www.lenzg.org/ V_V -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCyTcySVDhKrJykfIRAqAEAJ93Fx7EpdtAfoR7ab61D9CDgIFX1ACfekHD 9Dxg1MDYwph+8tQfHicWii8= =YM7P -----END PGP SIGNATURE----- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: IBM HDAPS things are looking up
- From: Jens Axboe <[email protected]>
- Re: IBM HDAPS things are looking up
- References:
- IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Jesper Juhl <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Lenz Grimmer <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Jens Axboe <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Alejandro Bonilla <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Jens Axboe <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Arjan van de Ven <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Jens Axboe <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Arjan van de Ven <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Jens Axboe <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Lenz Grimmer <[email protected]>
- Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- From: Jens Axboe <[email protected]>
- IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- Prev by Date: [PATCH][Update 2] Kconfig changes: s/menu/menuconfig/
- Next by Date: Re: FUSE merging? (2)
- Previous by thread: Re: IBM HDAPS things are looking up (was: Re: [Hdaps-devel] Re: [ltp] IBM HDAPS Someone interested? (Accelerometer))
- Next by thread: Re: IBM HDAPS things are looking up
- Index(es):