ports/162909: [MAINTAINER] sysutils/udfclient: fix build on newer FreeBSD
Andriy Gapon
avg at icyb.net.ua
Sun Nov 27 20:40:10 UTC 2011
>Number: 162909
>Category: ports
>Synopsis: [MAINTAINER] sysutils/udfclient: fix build on newer FreeBSD
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 27 20:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Andriy Gapon
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD 10.0-CURRENT amd64
>Description:
[DESCRIBE CHANGES]
Added file(s):
- files/patch-uscsi_subr.c
Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:
--- udfclient-0.7.5.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/udfclient.orig/files/patch-uscsi_subr.c /usr/ports/sysutils/udfclient/files/patch-uscsi_subr.c
--- /usr/ports/sysutils/udfclient.orig/files/patch-uscsi_subr.c 1970-01-01 03:00:00.000000000 +0300
+++ /usr/ports/sysutils/udfclient/files/patch-uscsi_subr.c 2011-11-27 16:41:30.634782970 +0200
@@ -0,0 +1,45 @@
+--- uscsi_subr.c.orig 2011-11-15 19:51:44.387439246 +0200
++++ uscsi_subr.c 2011-11-27 16:41:07.706327140 +0200
+@@ -412,6 +412,7 @@ uscsi_command(int flags, struct uscsi_de
+ struct scsi_sense_data *cam_sense_data;
+ union ccb ccb;
+ uint32_t cam_sense;
++ u_int sense_len;
+ uint8_t *keypos;
+ int camflags;
+
+@@ -468,17 +469,33 @@ uscsi_command(int flags, struct uscsi_de
+
+ /* print sense info */
+ cam_sense_data = &ccb.csio.sense_data;
++ sense_len = ccb.csio.sense_len - ccb.csio.sense_resid;
+ if (uscsi_sense) {
++#if __FreeBSD_version > 900043
++ int error_code, sense_key;
++ uint8_t sks[3];
++
++ scsi_extract_sense_len(cam_sense_data, sense_len,
++ &error_code, &sense_key,
++ &uscsi_sense->asc, &uscsi_sense->ascq, /*show_errors*/ 0);
++
++ if ((scsi_get_sks(cam_sense_data, sense_len, sks) == 0)) {
++ uscsi_sense->skey_valid = 1;
++ uscsi_sense->sense_key = (sks[1] << 8) | sks[2];
++ } else
++ uscsi_sense->skey_valid = 0;
++#else
+ uscsi_sense->asc = cam_sense_data->add_sense_code;
+ uscsi_sense->ascq = cam_sense_data->add_sense_code_qual;
+ keypos = cam_sense_data->sense_key_spec;
+ uscsi_sense->skey_valid = keypos[0] & 128;
+ uscsi_sense->sense_key = (keypos[1] << 8) | (keypos[2]);
++#endif
+ }
+
+ uscsi_print_sense((char *) disc->dev_name,
+ cmd, cmdlen,
+- (uint8_t *) cam_sense_data, 8 + cam_sense_data->extra_len, 1);
++ (uint8_t *) cam_sense_data, sense_len, 1);
+
+ return EFAULT;
+ }
--- udfclient-0.7.5.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list