.IR uuid
.B blkid
-.RB [ \-ghlv ]
+.RB [ \-dghlv ]
.RB [ \-c
.IR file ]
.RB [ \-w
scanned but not necessarily available at this time), specify
.IR /dev/null .
.TP
+.B \-d
+Don't encode non-printing characters. The non-printing characters are encoded
+by ^ and M- notation by default. Note that \fB-o udev\fR output format uses
+a diffrent encoding and this encoding cannot be disabled.
+.TP
.B \-g
Perform a garbage collection pass on the blkid cache to remove
devices which no longer exist.
const char *progname = "blkid";
+int raw_chars;
+
static void print_version(FILE *out)
{
fprintf(out, "%s from %s (libblkid %s, %s)\n",
" %1$s -i [-s <tag>] [-o <format>] <dev> ...\n\n"
"Options:\n"
" -c <file> cache file (default: /etc/blkid.tab, /dev/null = none)\n"
+ " -d don't encode non-printing characters\n"
" -h print this usage message and exit\n"
" -g garbage collect the blkid cache\n"
" -o <format> output format; can be one of:\n"
while (len--) {
ch = *cp++;
- if (ch > 128) {
- fputs("M-", stdout);
- ch -= 128;
- }
- if ((ch < 32) || (ch == 0x7f)) {
- fputc('^', stdout);
- ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
+ if (!raw_chars) {
+ if (ch > 128) {
+ fputs("M-", stdout);
+ ch -= 128;
+ }
+ if ((ch < 32) || (ch == 0x7f)) {
+ fputc('^', stdout);
+ ch ^= 0x40; /* ^@, ^A, ^B; ^? for DEL */
+ }
}
fputc(ch, stdout);
}
show[0] = NULL;
- while ((c = getopt (argc, argv, "c:f:ghilL:n:o:O:ps:S:t:u:U:w:v")) != EOF)
+ while ((c = getopt (argc, argv, "c:df:ghilL:n:o:O:ps:S:t:u:U:w:v")) != EOF)
switch (c) {
case 'c':
if (optarg && !*optarg)
if (!write)
write = read;
break;
+ case 'd':
+ raw_chars = 1;
+ break;
case 'L':
eval++;
search_value = strdup(optarg);