diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-07-02 12:23:01 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2006-07-02 12:23:01 +0800 |
commit | bfd75e3b00ee6017da057d9be9d49d67e91a02c6 (patch) | |
tree | ede9d720bd2ad0bcaa833e0b0833e19a16ae27c5 | |
parent | 53f7213efb8e8e8e8afa8e4e687c4bbb28ab969d (diff) | |
download | marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.tar marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.tar.gz marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.tar.bz2 marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.tar.lz marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.tar.xz marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.tar.zst marcuscom-ports-bfd75e3b00ee6017da057d9be9d49d67e91a02c6.zip |
Add support for 5.X.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@6503 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c b/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c new file mode 100644 index 000000000..f2d3786e6 --- /dev/null +++ b/sysutils/hal/files/patch-hald_freebsd_libprobe_hfp-cdrom.c @@ -0,0 +1,47 @@ +--- hald/freebsd/libprobe/hfp-cdrom.c 7 May 2006 00:27:55 -0000 1.4 ++++ hald/freebsd/libprobe/hfp-cdrom.c 2 Jul 2006 04:20:47 -0000 1.5 +@@ -112,6 +112,7 @@ + + if (cdrom->fd >= 0) /* ATAPI transport */ + { ++#ifdef IOCATAREQUEST + struct ata_ioc_request req; + + memset(&req, 0, sizeof(req)); +@@ -140,6 +141,36 @@ + *err = hfp_strdup_printf("ATAPI error %i", req.error); + return FALSE; + } ++#else ++ struct ata_cmd iocmd; ++ ++ memset(&iocmd, 0, sizeof(iocmd)); ++ iocmd.u.request.flags = ATA_CMD_ATAPI; ++ iocmd.u.request.timeout = timeout; ++ memcpy(iocmd.u.request.u.atapi.ccb, ccb, 16); ++ ++ if (data) ++ { ++ static int atapi_direction[] = { 0, ATA_CMD_READ, ATA_CMD_WRITE }; ++ ++ iocmd.u.request.flags |= atapi_direction[direction]; ++ iocmd.u.request.data = data; ++ iocmd.u.request.count = len; ++ } ++ ++ if (ioctl(cdrom->fd, IOCATA, &iocmd) < 0) ++ { ++ if (err) ++ *err = hfp_strdup_printf("IOCATA failure: %s", strerror(errno)); ++ return FALSE; ++ } ++ if (iocmd.u.request.error != 0) ++ { ++ if (err) ++ *err = hfp_strdup_printf("ATAPI error %i", iocmd.u.request.error); ++ return FALSE; ++ } ++#endif + } + else /* SCSI transport */ + { |