Re: [PATCH] attr: support quoting pathname patterns in C style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/4/2010 9:55 AM, Nguyán ThÃi Ngác Duy wrote:
Full pattern must be quoted. So 'pat"t"ern attr' will give exactly
'pat"t"ern', not 'pattern'. Also clarify that leading whitespaces are
not part of the pattern and document comment syntax.

Signed-off-by: Nguyán ThÃi Ngác Duy<pclouds@xxxxxxxxx>
diff --git a/attr.c b/attr.c
index 6aff695..f3063d8 100644
--- a/attr.c
+++ b/attr.c
  	name = cp;
-	namelen = strcspn(name, blank);
+	if (*cp == '"') {
+		if (unquote_c_style(&pattern, name,&ep))
+			die("Broken attribute line: %s", line);

The error message is perhaps a bit too generic, indicating only that _something_ on the line caused a problem. Mentioning that bad quoting of 'name' was at fault would help focus the user's attention where it is needed.

-- ES
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]