From 88d34b4686a650dba89674aa302ab13c78e8cef0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 14 Apr 2013 00:50:10 +0000 Subject: iostat_parser: allow '-' for device names Linux device-mapper names show up as 'dm-0', 'dm-1' and so on. This allows users to store MogileFS files on encrypted devices using dm-crypt and perhaps other, similar tools. --- iostat_parser.rl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iostat_parser.rl b/iostat_parser.rl index 27ede88..10ab104 100644 --- a/iostat_parser.rl +++ b/iostat_parser.rl @@ -14,7 +14,9 @@ } fgoto main; }; - device_name = ([a-zA-Z0-9/]+){1,71} $ { + + # Linux device mapper: dm-N + device_name = ([a-zA-Z0-9/\-]+){1,71} $ { if (iostat->dev_tip < (sizeof(iostat->dev)-1)) iostat->dev[iostat->dev_tip++] = fc; }; -- cgit v1.2.3-24-ge0c7