Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/libbb/login.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 9  Line 9 
9   * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.   * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
10   */   */
11    
 #include <sys/param.h>  /* MAXHOSTNAMELEN */  
 #include <sys/utsname.h>  
12  #include "libbb.h"  #include "libbb.h"
13    /* After libbb.h, since it needs sys/types.h on some systems */
14    #include <sys/utsname.h>
15    
16  #define LOGIN " login: "  #define LOGIN " login: "
17    
# Line 62  void FAST_FUNC print_login_issue(const c Line 62  void FAST_FUNC print_login_issue(const c
62   case 'm':   case 'm':
63   outbuf = uts.machine;   outbuf = uts.machine;
64   break;   break;
65    /* The field domainname of struct utsname is Linux specific. */
66    #if defined(__linux__)
67   case 'D':   case 'D':
68   case 'o':   case 'o':
69   outbuf = uts.domainname;   outbuf = uts.domainname;
70   break;   break;
71    #endif
72   case 'd':   case 'd':
73   strftime(buf, sizeof(buf), fmtstr_d, localtime(&t));   strftime(buf, sizeof(buf), fmtstr_d, localtime(&t));
74   break;   break;
# Line 82  void FAST_FUNC print_login_issue(const c Line 85  void FAST_FUNC print_login_issue(const c
85   fputs(outbuf, stdout);   fputs(outbuf, stdout);
86   }   }
87   fclose(fp);   fclose(fp);
88   fflush(stdout);   fflush_all();
89  }  }
90    
91  void FAST_FUNC print_login_prompt(void)  void FAST_FUNC print_login_prompt(void)
# Line 91  void FAST_FUNC print_login_prompt(void) Line 94  void FAST_FUNC print_login_prompt(void)
94    
95   fputs(hostname, stdout);   fputs(hostname, stdout);
96   fputs(LOGIN, stdout);   fputs(LOGIN, stdout);
97   fflush(stdout);   fflush_all();
98   free(hostname);   free(hostname);
99  }  }
100    

Legend:
Removed from v.983  
changed lines
  Added in v.984