#ifndef SECCOMP_SET_MODE_STRICT #define SECCOMP_SET_MODE_STRICT 0 #endif #ifndef SECCOMP_SET_MODE_FILTER #define SECCOMP_SET_MODE_FILTER 1 #endif static size_t syscall_arg__scnprintf_seccomp_op(char *bf, size_t size, struct syscall_arg *arg) { int op = arg->val; size_t printed = 0; switch (op) { #define P_SECCOMP_SET_MODE_OP(n) case SECCOMP_SET_MODE_##n: printed = scnprintf(bf, size, #n); break P_SECCOMP_SET_MODE_OP(STRICT); P_SECCOMP_SET_MODE_OP(FILTER); #undef P_SECCOMP_SET_MODE_OP default: printed = scnprintf(bf, size, "%#x", op); break; } return printed; } #define SCA_SECCOMP_OP syscall_arg__scnprintf_seccomp_op #ifndef SECCOMP_FILTER_FLAG_TSYNC #define SECCOMP_FILTER_FLAG_TSYNC 1 #endif static size_t syscall_arg__scnprintf_seccomp_flags(char *bf, size_t size, struct syscall_arg *arg) { int printed = 0, flags = arg->val; #define P_FLAG(n) \ if (flags & SECCOMP_FILTER_FLAG_##n) { \ printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \ flags &= ~SECCOMP_FILTER_FLAG_##n; \ } P_FLAG(TSYNC); #undef P_FLAG if (flags) printed += scnprintf(bf + printed, size - printed, "%s%#x", printed ? "|" : "", flags); return printed; } #define SCA_SECCOMP_FLAGS syscall_arg__scnprintf_seccomp_flags ck'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/sound/pcmcia/pdaudiocf/pdaudiocf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-05 18:10:35 +0100
committerJens Axboe <axboe@fb.com>2017-02-06 09:34:46 -0700
commiteeeefd41843218c55a8782a6920f044d9bf6207a (patch)
treec342eac46626e62745aa8e1a982626efca8b121d /sound/pcmcia/pdaudiocf/pdaudiocf.c
parentc14024dbb156c8392908aaa822097d27c6af8ec8 (diff)
block: don't try Write Same from __blkdev_issue_zeroout
Write Same can return an error asynchronously if it turns out the underlying SCSI device does not support Write Same, which makes a proper fallback to other methods in __blkdev_issue_zeroout impossible. Thus only issue a Write Same from blkdev_issue_zeroout an don't try it at all from __blkdev_issue_zeroout as a non-invasive workaround. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Junichi Nomura <j-nomura@ce.jp.nec.com> Fixes: e73c23ff ("block: add async variant of blkdev_issue_zeroout") Tested-by: Junichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'sound/pcmcia/pdaudiocf/pdaudiocf.c')