ALT Linux Bugzilla
– Attachment 4780 Details for
Bug 24987
не обрабатывается спецсимвол '\R'
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Added '\R' special char support
agetty-alt-release.patch (text/plain), 785 bytes, created by
Alexey Shabalin
on 2011-01-28 17:11:36 MSK
(
hide
)
Description:
Added '\R' special char support
Filename:
MIME Type:
Creator:
Alexey Shabalin
Created:
2011-01-28 17:11:36 MSK
Size:
785 bytes
patch
obsolete
>diff --git a/login-utils/agetty.c b/login-utils/agetty.c >index a6e2499..6c68ab0 100644 >--- a/login-utils/agetty.c >+++ b/login-utils/agetty.c >@@ -956,6 +956,29 @@ do_prompt(op, tp) > printf ((users == 1) ? _("user") : _("users")); > break; > } >+ case 'R': >+ { >+ FILE *fp = fopen ("/etc/altlinux-release", "r"); >+ if (fp) >+ { >+ char rel[1024]; >+ if (fgets(rel, sizeof rel, fp)) >+ { >+ unsigned len; >+ for (len = strlen (rel); len > 0; --len) >+ { >+ if (rel[len-1] == '\n' || rel[len-1] == '\r') >+ rel[len-1] = '\0'; >+ else >+ break; >+ } >+ if (len > 0) >+ printf ("%s", rel); >+ } >+ fclose (fp); >+ } >+ break; >+ } > default: > (void) putchar(c); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24987
: 4780