Permalink
Browse files

. 在批处理脚本中,变量可以使用单'%'。(issues #173)

  如:partnew %@root:~0,-2%0) 0x00 (hd0,3)+1
  • Loading branch information...
yaya
yaya committed Apr 8, 2018
1 parent 39b64a9 commit f5b17e3307cdb5ca28b82c989d50e956adec5860
Showing with 13 additions and 0 deletions.
  1. +4 −0 ChangeLog_chenall.txt
  2. +9 −0 stage2/builtins.c
@@ -1,4 +1,8 @@
更新说明:
2018-03-26(yaya)
在批处理脚本中,变量可以使用单'%'。
如:partnew %@root:~0,-2%0) 0x00 (hd0,3)+1
2018-03-26(yaya)
函数 map 增加 --in-situ=FLAGS_AND_ID 参数。
低字节是 FLAGS,0/1=清除分区表后3项活动分区标志/清空分区表最后3项,默认0。
@@ -16954,6 +16954,7 @@ static int bat_run_script(char *filename,char *arg,int flags)
continue;
}
int per_cent = 0;
while(*p_bat)
{
if (*p_bat != '%' || (file_ext = p_bat++,*p_bat == '%'))
@@ -16962,6 +16963,13 @@ static int bat_run_script(char *filename,char *arg,int flags)
continue;
}//file_ext now use for backup p_bat see the loop end.
if (per_cent)
{
per_cent = 0;
p_bat = file_ext;
*p_cmd++ = *p_bat++;
continue;
}
i = 0;
if (*p_bat == '~')
@@ -17029,6 +17037,7 @@ static int bat_run_script(char *filename,char *arg,int flags)
}
else
{
per_cent = 1;
p_bat = file_ext;
*p_cmd++ = *p_bat;
}

0 comments on commit f5b17e3

Please sign in to comment.