Re: [systemd-devel] [PATCH v2] cryptsetup: Implement offset and skip options

2015-04-17 Thread Martin Pitt
Hello all, Zbigniew Jędrzejewski-Szmek [2015-04-16 23:42 +]: Hm, I'd go even further and add a check: if (arg_offset arg_type != NULL arg_type != CRYPT_PLAIN) log_warning(offset= ignored with type %s, arg_type); if (arg_skip arg_type != NULL arg_type != CRYPT_PLAIN)

[systemd-devel] [PATCH v2] cryptsetup: Implement offset and skip options

2015-04-16 Thread Martin Pitt
Hello again, Martin Pitt [2015-04-16 6:55 -0500]: This simple patch adds offset=. While I was at it I also added skip=. I attached my script for testing this to the fd.o bug. Zbigniew reviewed it on https://bugs.freedesktop.org/show_bug.cgi?id=87717 , thanks! This updated patch makes

Re: [systemd-devel] [PATCH v2] cryptsetup: Implement offset and skip options

2015-04-16 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Apr 16, 2015 at 02:56:39PM -0500, Martin Pitt wrote: +} else if (startswith(option, offset=)) { + +if (safe_atou64(option+7, arg_offset) 0) { +log_error(offset= parse failure, refusing.); +return -EINVAL; +