SHA256
1
0
forked from pool/targetcli-fb
targetcli-fb/Use-signed-char-instead-of-char.patch
Lee Duncan f8c3097b3b Accepting request 596386 from home:dmdiss:bsc1079329_krbd
- Merge RBD support from non-fb version (bsc#1079329)
  + Split-out-blockdev-readonly-state-detection-helper.patch
  + rbd-support.patch (SLE/Leap only, due to LIO kernel dependency)
  + Add explicit Provides for "python-rtslib-rbd"
- Detect write-protected block devices (bsc#1070815)
  + Auto-detect-readonly-state-for-iblock-devices.patch
  + Use-signed-char-instead-of-char.patch

- Automatically generate version string from upstream tag
  + Retain current fb-removed version format used
  + Rename targetcli-fb-2.1.fb47.tar.xz to targetcli-fb-2.1.47.tar.xzar.xz
    and cleanup hardcoded duplicate name/version values in spec

OBS-URL: https://build.opensuse.org/request/show/596386
OBS-URL: https://build.opensuse.org/package/show/Base:System/targetcli-fb?expand=0&rev=18
2018-04-16 20:19:01 +00:00

30 lines
1.0 KiB
Diff

From 5bfd75f66225fb4127faa2dd14d3c43af9a575a4 Mon Sep 17 00:00:00 2001
From: Taylor Jakobson <tjakobs@us.ibm.com>
Date: Thu, 1 Feb 2018 14:44:32 -0600
Subject: [PATCH 2/4] Use signed char instead of char
Python3 does not have the "character" type, use signed char instead.
(cherry picked from commit ed5ff9b9505e50b545e86dfbdd32077f0ddda0cb)
Reviewed-by: David Disseldorp <ddiss@suse.de>
---
targetcli/ui_backstore.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py
index 66a21c5..546d9d2 100644
--- a/targetcli/ui_backstore.py
+++ b/targetcli/ui_backstore.py
@@ -526,7 +526,7 @@ class UIBlockBackstore(UIBackstore):
except (OSError, IOError):
raise ExecutionError("Could not open %s" % dev)
# ioctl returns an int. Provision a buffer for it
- buf = array.array('c', [chr(0)] * 4)
+ buf = array.array('b', [0] * 4)
try:
fcntl.ioctl(f, BLKROGET, buf)
except (OSError, IOError):
--
2.13.6