-tar (1.23-3) UNRELEASED; urgency=low
+tar (1.23-3) UNRELEASED; urgency=medium
* add xz-utils back to the Suggests list since it may not be 'required'
forever
* current debhelper includes trigger support, closes: #561598
+ * patch from upstream to fix ability of rmt to accept mixed file mode
+ representations, closes: #587702, #597672
- -- Bdale Garbee <bdale@gag.com> Tue, 15 Jun 2010 09:32:39 -0600
+ -- Bdale Garbee <bdale@gag.com> Wed, 22 Sep 2010 00:33:16 -0600
tar (1.23-2.1) unstable; urgency=low
va_list ap;
va_start (ap, fmt);
vfprintf (stdout, fmt, ap);
+ fflush (stdout);
VDEBUG (10, "S: ", fmt, ap);
}
DEBUG1 (10, "S: %s\n", msg);
DEBUG1 (1, "error: %s\n", msg);
fprintf (stdout, "E%d\n%s\n", code, msg);
+ fflush (stdout);
}
void
int
decode_open_flag (const char *mstr, int *pmode)
{
+ int numeric_mode = 0;
int mode = 0;
+ const char *p;
- while (mstr)
+ mstr = skip_ws (mstr);
+ if (c_isdigit (*mstr))
{
- int v;
- const char *p;
-
- mstr = skip_ws (mstr);
- if (*mstr == 0)
- break;
- else if (c_isdigit (*mstr))
- v = strtol (mstr, (char**) &p, 10);
- else if (xlat_kw (mstr, "O_", open_flag_kw, &v, &p))
- {
- rmt_error_message (EINVAL, "invalid open mode");
- return 1;
- }
-
- mode |= v;
+ numeric_mode = strtol (mstr, (char**) &p, 10);
+ mstr = skip_ws (p);
+ }
- if (*p && c_isblank (*p))
- p = skip_ws (p);
- if (*p == 0)
- break;
- else if (*p == '|')
- {
- /* FIXMEL
- if (p[1] == 0)
- rmt_error_message (EINVAL, "invalid open mode");
- */
- mstr = p + 1;
- }
- else
+ if (*mstr)
+ {
+ while (mstr)
{
- rmt_error_message (EINVAL, "invalid open mode");
- return 1;
+ int v;
+
+ mstr = skip_ws (mstr);
+ if (*mstr == 0)
+ break;
+ else if (c_isdigit (*mstr))
+ v = strtol (mstr, (char**) &p, 10);
+ else if (xlat_kw (mstr, "O_", open_flag_kw, &v, &p))
+ {
+ rmt_error_message (EINVAL, "invalid open mode");
+ return 1;
+ }
+
+ mode |= v;
+
+ if (*p && c_isblank (*p))
+ p = skip_ws (p);
+ if (*p == 0)
+ break;
+ else if (*p == '|')
+ {
+ /* FIXMEL
+ if (p[1] == 0)
+ rmt_error_message (EINVAL, "invalid open mode");
+ */
+ mstr = p + 1;
+ }
+ else
+ {
+ rmt_error_message (EINVAL, "invalid open mode");
+ return 1;
+ }
}
}
+ else
+ mode = numeric_mode;
*pmode = mode;
return 0;
}
64|512
CREAT|TRUNC
+ In addition, a compined form is also allowed, i.e. a decimal mode followed
+ by its symbolic representation. In this case the symbolic representation
+ is given preference.
+
Reply
-----
A0\n on success, E<errno>\n<msg>\n on error.