- Update to version 1.0.6

- Add patch to fix build on 9.0 and beyond

PR:             ports/167735
Submitted by:   maintainer
This commit is contained in:
Pawel Pekala 2012-05-09 23:44:05 +00:00
parent 5144d2f135
commit a4242291d4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=296333
3 changed files with 94 additions and 6 deletions

View File

@ -6,9 +6,10 @@
#
PORTNAME= abgx360
PORTVERSION= 1.0.5
PORTVERSION= 1.0.6
CATEGORIES= sysutils
MASTER_SITES= http://abgx360.x-scene.com/
MASTER_SITES= http://abgx360.x-scene.com/ \
http://update.cooltrainer.org/freebsd-ports/sysutils/abgx360/
MAINTAINER= root@cooltrainer.org
COMMENT= Verify and repair Xbox 360 backup images
@ -24,8 +25,8 @@ do-install:
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 900044
BROKEN= does not compile on FreeBSD 9.X
.if ${OSVERSION} >= 900000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src-abgx360.c
.endif
.if ${OSVERSION} > 900000

View File

@ -1,2 +1,2 @@
SHA256 (abgx360-1.0.5.tar.gz) = 69700079d7308b2d7fd20eafbde1bd939da4c900a6240511e4289de1dd112615
SIZE (abgx360-1.0.5.tar.gz) = 264889
SHA256 (abgx360-1.0.6.tar.gz) = d73e0270383ff9c150224e1f687d1d5643b4c23752cfaec2dcfde8a12db5a8f7
SIZE (abgx360-1.0.6.tar.gz) = 308959

View File

@ -0,0 +1,87 @@
--- src/abgx360.c.orig 2012-05-07 10:23:05.997665157 -0400
+++ src/abgx360.c 2012-05-07 10:26:22.824665331 -0400
@@ -2220,82 +2220,8 @@
int sendcdb(int direction, unsigned char *dataBuffer, unsigned long dataBufferSize,
unsigned char *cdb, unsigned char cdbLen, bool checkreturnlength) {
- int i;
- union ccb *ccb = NULL;
- ccb = cam_getccb(cam_dev);
- if (ccb == NULL) {
- color(red);
- printf("ERROR: Memory allocation of CAM CCB failed! Game over man... Game over!%s", newline);
- color(normal);
- exit(1);
- }
- cam_fill_csio(&ccb->csio,
- 1, // retries
- NULL, // cbfcnp // ?
- direction, // flags
- MSG_SIMPLE_Q_TAG, // tag_action // What to do for tag queueing - ?
- dataBuffer, // data_ptr
- dataBufferSize, // dxfer_len
- 96, // sense_len // Number of bytes to autosense - ?
- cdbLen, // cdb_len
- dvdtimeout * 1000); // timeout (ms)
- memcpy(ccb->csio.cdb_io.cdb_bytes, cdb, cdbLen);
- int rv = cam_send_ccb(cam_dev, ccb);
- if (debug) {
- printf("ccb->csio.sense_data.error_code = %02X%s", ccb->csio.sense_data.error_code, newline);
- printf("ccb->csio.sense_data.segment = %02X%s", ccb->csio.sense_data.segment, newline);
- printf("ccb->csio.sense_data.flags = %02X%s", ccb->csio.sense_data.flags, newline);
- printf("ccb->csio.sense_data.info = %02X%02X%02X%02X%s", ccb->csio.sense_data.info[0], ccb->csio.sense_data.info[1], ccb->csio.sense_data.info[2], ccb->csio.sense_data.info[3], newline);
- printf("ccb->csio.sense_data.extra_len = %02X%s", ccb->csio.sense_data.extra_len, newline);
- printf("ccb->csio.sense_data.cmd_spec_info = %02X%02X%02X%02X%s", ccb->csio.sense_data.cmd_spec_info[0], ccb->csio.sense_data.cmd_spec_info[1], ccb->csio.sense_data.cmd_spec_info[2], ccb->csio.sense_data.cmd_spec_info[3], newline);
- printf("ccb->csio.sense_data.add_sense_code = %02X%s", ccb->csio.sense_data.add_sense_code, newline);
- printf("ccb->csio.sense_data.add_sense_code_qual = %02X%s", ccb->csio.sense_data.add_sense_code_qual, newline);
- printf("ccb->csio.sense_data.fru = %02X%s", ccb->csio.sense_data.fru, newline);
- printf("ccb->csio.sense_data.sense_key_spec = %02X%02X%02X%s", ccb->csio.sense_data.sense_key_spec[0], ccb->csio.sense_data.sense_key_spec[1], ccb->csio.sense_data.sense_key_spec[2], newline);
- printf("ccb->csio.sense_data.extra_bytes = ");
- for (i=0;i<14;i++) printf("%02X", ccb->csio.sense_data.extra_bytes[i]);
- printf("%s", newline);
- }
- sprintf(sense, "%02X/%02X/%02X", ccb->csio.sense_data.flags, ccb->csio.sense_data.add_sense_code, ccb->csio.sense_data.add_sense_code_qual); // not 100% sure about this
- if (rv == -1) {
- if (debug || testingdvd) {
- color(red);
- printf("ERROR: cam_send_ccb returned -1! (%s)%s", strerror(errno), newline);
- color(normal);
- }
- return 1;
- }
- // check sense code (00/00/00 or 01/xx/xx is ok)
- if (ccb->csio.sense_data.flags != 0x00 || ccb->csio.sense_data.add_sense_code != 0x00 || ccb->csio.sense_data.add_sense_code_qual != 0x00) {
- if (ccb->csio.sense_data.flags != 0x01) {
- if (debug || testingdvd) {
- color(red);
- printf("sense: %s (%s)%s", sense, cdberror(sense), newline);
- color(normal);
- }
- return 1;
- }
- else if (debug || testingdvd) {
- color(yellow);
- printf("sense: %s (%s)%s", sense, cdberror(sense), newline);
- color(normal);
- }
- }
- else if (debug) printf("sense: %s (%s)%s", sense, cdberror(sense), newline);
- // todo: check that the proper amount of bytes were returned
-
- if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
- // error occured (includes sense errors - not sure if 01/xx/xx will trigger this or not)
- if (debug || testingdvd) {
- color(red);
- printf("ERROR: ccb->ccb_h.status (%08X) & CAM_STATUS_MASK (%08X) [%08X] != CAM_REQ_CMP (%08X)%s",
- ccb->ccb_h.status, CAM_STATUS_MASK, ccb->ccb_h.status & CAM_STATUS_MASK, CAM_REQ_CMP, newline);
- color(normal);
- }
- return 1;
- }
- cam_freeccb(ccb);
- return 0;
+ sprintf(sense, "UU/OO/SS"); // temp -- gives sense error "Unsupported Operat
+ return 1; // temp
}
#elif (defined(__OpenBSD__) || defined(__NetBSD__))