diff options
author | wiz <wiz> | 2009-03-22 09:30:38 +0000 |
---|---|---|
committer | wiz <wiz> | 2009-03-22 09:30:38 +0000 |
commit | e6424e8ccd8067f70b2a836d54aec9a34e8d4947 (patch) | |
tree | 44392645b611f7e2ed81cd67ce01271a64e5bbfe /sysutils | |
parent | 533d5337c35faffe1ab0ab47ccf3ce396ca21497 (diff) | |
download | pkgsrc-e6424e8ccd8067f70b2a836d54aec9a34e8d4947.tar.gz |
Fix CD burning handling on NetBSD. From Jared McNeill in PR 41043.
Bump PKGREVISION.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/brasero/Makefile | 3 | ||||
-rw-r--r-- | sysutils/brasero/files/scsi-netbsd.c | 13 |
2 files changed, 11 insertions, 5 deletions
diff --git a/sysutils/brasero/Makefile b/sysutils/brasero/Makefile index 8925c64c066..ae6a236ef8d 100644 --- a/sysutils/brasero/Makefile +++ b/sysutils/brasero/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2009/03/19 23:20:07 hasso Exp $ +# $NetBSD: Makefile,v 1.3 2009/03/22 09:30:38 wiz Exp $ # DISTNAME= brasero-2.26.0 +PKGREVISION= 1 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/brasero/2.26/} EXTRACT_SUFX= .tar.bz2 diff --git a/sysutils/brasero/files/scsi-netbsd.c b/sysutils/brasero/files/scsi-netbsd.c index 42477f69c7e..b4f5737fb66 100644 --- a/sysutils/brasero/files/scsi-netbsd.c +++ b/sysutils/brasero/files/scsi-netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsi-netbsd.c,v 1.1.1.1 2009/03/16 10:49:06 jmcneill Exp $ */ +/* $NetBSD: scsi-netbsd.c,v 1.2 2009/03/22 09:30:39 wiz Exp $ */ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ /* * Libbrasero-media @@ -67,7 +67,8 @@ typedef struct _BraseroScsiCmd BraseroScsiCmd; #define BRASERO_SCSI_CMD_OPCODE_OFF 0 #define BRASERO_SCSI_CMD_SET_OPCODE(command) (command->cmd [BRASERO_SCSI_CMD_OPCODE_OFF] = command->info->opcode) -#define OPEN_FLAGS O_RDWR /*|O_EXCL */|O_NONBLOCK +#define OPEN_FLAGS (O_RDWR|O_NONBLOCK) +#define SCSIREQ_TIMEOUT (30 * 1000) /** * This is to send a command @@ -85,6 +86,7 @@ brasero_sg_command_setup (scsireq_t *req, memcpy(req->cmd, cmd->cmd, req->cmdlen); req->databuf = buffer; req->datalen = size; + req->timeout = SCSIREQ_TIMEOUT; /* where to output the scsi sense buffer */ req->senselen = BRASERO_SENSE_DATA_SIZE; @@ -112,7 +114,7 @@ brasero_scsi_command_issue_sync (gpointer command, size); res = ioctl (cmd->handle->fd, SCIOCCOMMAND, &req); - if (res) { + if (res == -1) { BRASERO_SCSI_SET_ERRCODE (error, BRASERO_SCSI_ERRNO); return BRASERO_SCSI_FAILURE; } @@ -162,11 +164,14 @@ brasero_device_handle_open (const gchar *path, int fd; int flags = OPEN_FLAGS; BraseroDeviceHandle *handle; + gchar *rdevnode; if (exclusive) flags |= O_EXCL; - fd = open (path, flags); + rdevnode = g_strdup_printf ("/dev/r%s", path + strlen ("/dev/")); + fd = open (rdevnode, flags); + g_free (rdevnode); if (fd < 0) { if (code) { if (errno == EAGAIN |