summaryrefslogtreecommitdiff
path: root/debian/patches/63_dd-appenderrors.patch
blob: 185e37bfd4ea1cd5587767dca13c2d4573cd4d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh /usr/share/dpatch/dpatch-run

@DPATCH@
Index: b/src/dd.c
===================================================================
--- a/src/dd.c
+++ b/src/dd.c
@@ -1422,6 +1422,9 @@ scanargs (int argc, char *const *argv)
   if (multiple_bits_set (input_flags & (O_DIRECT | O_NOCACHE))
       || multiple_bits_set (output_flags & (O_DIRECT | O_NOCACHE)))
     error (EXIT_FAILURE, 0, _("cannot combine direct and nocache"));
+  if ((output_flags & O_APPEND) &&
+      ((conversions_mask & C_NOTRUNC) != C_NOTRUNC))
+    error (0, 0, _("you probably want conv=notrunc with oflag=append"));
 
   if (input_flags & O_NOCACHE)
     {