New commands
This commit is contained in:
parent
1e200eea25
commit
18549e8120
|
@ -180,7 +180,7 @@ char *KeFormatCurTime(void)
|
||||||
{
|
{
|
||||||
Time_t *RtcTime = KeGetCurTime();
|
Time_t *RtcTime = KeGetCurTime();
|
||||||
snprintf(TimeFmtBuf, sizeof(TimeFmtBuf),
|
snprintf(TimeFmtBuf, sizeof(TimeFmtBuf),
|
||||||
"%02d/%02d/%02d ; %02d:%02d:%02d",
|
"%02d/%02d/%04d - %02d:%02d:%02d",
|
||||||
RtcTime->day,
|
RtcTime->day,
|
||||||
RtcTime->month,
|
RtcTime->month,
|
||||||
RtcTime->year + RtcTime->century*100,
|
RtcTime->year + RtcTime->century*100,
|
||||||
|
|
|
@ -68,9 +68,24 @@ error_t CmdHelp(int argc, char **argv, char *cmdline)
|
||||||
return EOK;
|
return EOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_t CmdClear(int argc, char **argv, char *cmdline)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < BtVideoInfo.framebufferHeight; i++)
|
||||||
|
KernLog("\n");
|
||||||
|
|
||||||
|
return EOK;
|
||||||
|
}
|
||||||
|
|
||||||
error_t CmdDate(int argc, char **argv, char *cmdline)
|
error_t CmdDate(int argc, char **argv, char *cmdline)
|
||||||
{
|
{
|
||||||
KernLog("%s\n", KeFormatCurTime());
|
KernLog("%.10s\n", KeFormatCurTime());
|
||||||
|
return EOK;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_t CmdTime(int argc, char **argv, char *cmdline)
|
||||||
|
{
|
||||||
|
KernLog("%s\n", &KeFormatCurTime()[13]);
|
||||||
return EOK;
|
return EOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -268,7 +268,7 @@ error_t vbprintf(Buffer_t *buf, const char *fmt, va_list ap)
|
||||||
// For strings, the precision field gives the maximum
|
// For strings, the precision field gives the maximum
|
||||||
// amount of characters to be read from the stream
|
// amount of characters to be read from the stream
|
||||||
// Zero/nonspecified precision means unlimited amount
|
// Zero/nonspecified precision means unlimited amount
|
||||||
if (prec == 0) prec = INT_MAX;
|
if (prec == 0) prec = INT_MAX;
|
||||||
|
|
||||||
for (; *s && prec-- ; s++) {
|
for (; *s && prec-- ; s++) {
|
||||||
rc = bputc(buf, (uchar)*s);
|
rc = bputc(buf, (uchar)*s);
|
||||||
|
|
Loading…
Reference in New Issue