public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Christian Iversen <chrivers@iversen-net.dk>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] Patch for disktest: Handle long filenames more reasonably
Date: Mon, 17 Jun 2013 16:23:46 +0200	[thread overview]
Message-ID: <51BF1BF2.1060006@iversen-net.dk> (raw)

Hi all (please CC as I'm not on the list)

I've been using disktest, but I found a less than optimal piece of code 
regarding the device names.

I'd like to contribute the following patch:

--- main2.h     2013-06-17 16:21:26.585825912 +0200
+++ main.h      2013-06-17 16:10:08.725310241 +0200
@@ -54,7 +54,7 @@
  #define BLKGETSIZE _IO(0x12,96)                /* IOCTL for getting 
the device size */
  #define BLKSSZGET  _IO(0x12,104)       /* ALT IOCTL for getting the 
device size */

-#define DEV_NAME_LEN           80              /* max character for 
target name */
+#define DEV_NAME_LEN           256             /* max character for 
target name */
  #define MAX_ARG_LEN                    160             /* max length 
of command line arguments for startarg display */
  #define HOSTNAME_SIZE          16              /* number of hostname 
characters used in mark header */
  #define BLK_SIZE                       512             /* default size 
of an LBA in bytes */


(or perhaps simply use PATH_MAX)

80 characters is way too much for devices like /dev/sdc, but easily too 
little for 
"/dev/disk/by-path/ip-172.16.15.51:3260-iscsi-iqn.2013-01.com.synology:srvnas1.02-lun-0" 
(that's a real device name, btw)

I know, iSCSI names are really long, but disktest should be able to 
handle it more gracefully. I got a really odd error ("could not open 
device") because the last handful of characters has been cut out.

-- 
Med venlig hilsen
Christian Iversen

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2013-06-17 14:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 14:23 Christian Iversen [this message]
2013-06-18 11:20 ` [LTP] Patch for disktest: Handle long filenames more reasonably chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51BF1BF2.1060006@iversen-net.dk \
    --to=chrivers@iversen-net.dk \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox