* [Qemu-devel] [PATCH] vl.c: optimized code format
@ 2015-01-13 5:18 Zhang Min
2015-01-13 9:38 ` Markus Armbruster
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Min @ 2015-01-13 5:18 UTC (permalink / raw)
To: qemu-devel, wu.wubin, boby.chen
Cc: lizhengui, fangyi.fangyi, hz.wangzhiwei, subo7, kathy.wangting,
aliguori, wangjie88, pbonzini, Rudy Zhang, shiweixian
From: Rudy Zhang <rudy.zhangmin@huawei.com>
There are several tab characters in the 'vl.c' file. It leads to
to misalignment of the code. So, let the space instead of the tab.
Signed-off-by: Rudy Zhang <rudy.zhangmin@huawei.com>
---
vl.c | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/vl.c b/vl.c
index 7786b2f..05a6d56 100644
--- a/vl.c
+++ b/vl.c
@@ -743,7 +743,7 @@ int qemu_timedate_diff(struct tm *tm)
struct tm tmp = *tm;
tmp.tm_isdst = -1; /* use timezone to figure it out */
seconds = mktime(&tmp);
- }
+ }
else
seconds = mktimegm(tm) + rtc_date_offset;
@@ -2786,7 +2786,7 @@ int main(int argc, char **argv, char **envp)
if (optind >= argc)
break;
if (argv[optind][0] != '-') {
- hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
+ hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
} else {
const QEMUOption *popt;
@@ -2834,15 +2834,15 @@ int main(int argc, char **argv, char **envp)
if (drive_def(optarg) == NULL) {
exit(1);
}
- break;
+ break;
case QEMU_OPTION_set:
if (qemu_set_option(optarg) != 0)
exit(1);
- break;
+ break;
case QEMU_OPTION_global:
if (qemu_global_option(optarg) != 0)
exit(1);
- break;
+ break;
case QEMU_OPTION_mtdblock:
drive_add(IF_MTD, -1, optarg, MTD_OPTS);
break;
@@ -2894,7 +2894,7 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "qemu: invalid physical CHS format\n");
exit(1);
}
- if (hda_opts != NULL) {
+ if (hda_opts != NULL) {
char num[16];
snprintf(num, sizeof(num), "%d", cyls);
qemu_opt_set(hda_opts, "cyls", num);
@@ -3147,9 +3147,9 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_S:
autostart = 0;
break;
- case QEMU_OPTION_k:
- keyboard_layout = optarg;
- break;
+ case QEMU_OPTION_k:
+ keyboard_layout = optarg;
+ break;
case QEMU_OPTION_localtime:
rtc_utc = 0;
break;
@@ -3357,9 +3357,9 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_debugcon:
add_device_config(DEV_DEBUGCON, optarg);
break;
- case QEMU_OPTION_loadvm:
- loadvm = optarg;
- break;
+ case QEMU_OPTION_loadvm:
+ loadvm = optarg;
+ break;
case QEMU_OPTION_full_screen:
full_screen = 1;
break;
@@ -3474,7 +3474,7 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
break;
- case QEMU_OPTION_vnc:
+ case QEMU_OPTION_vnc:
#ifdef CONFIG_VNC
display_remote++;
vnc_display = optarg;
@@ -3512,11 +3512,11 @@ int main(int argc, char **argv, char **envp)
}
qemu_uuid_set = true;
break;
- case QEMU_OPTION_option_rom:
- if (nb_option_roms >= MAX_OPTION_ROMS) {
- fprintf(stderr, "Too many option ROMs\n");
- exit(1);
- }
+ case QEMU_OPTION_option_rom:
+ if (nb_option_roms >= MAX_OPTION_ROMS) {
+ fprintf(stderr, "Too many option ROMs\n");
+ exit(1);
+ }
opts = qemu_opts_parse(qemu_find_opts("option-rom"), optarg, 1);
if (!opts) {
exit(1);
@@ -3528,8 +3528,8 @@ int main(int argc, char **argv, char **envp)
fprintf(stderr, "Option ROM file is not specified\n");
exit(1);
}
- nb_option_roms++;
- break;
+ nb_option_roms++;
+ break;
case QEMU_OPTION_semihosting:
semihosting_enabled = 1;
semihosting_target = SEMIHOSTING_TARGET_AUTO;
@@ -4248,7 +4248,7 @@ int main(int argc, char **argv, char **envp)
/* init local displays */
switch (display_type) {
case DT_NOGRAPHIC:
- (void)ds; /* avoid warning if no display is configured */
+ (void)ds; /* avoid warning if no display is configured */
break;
#if defined(CONFIG_CURSES)
case DT_CURSES:
--
1.8.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vl.c: optimized code format
2015-01-13 5:18 [Qemu-devel] [PATCH] vl.c: optimized code format Zhang Min
@ 2015-01-13 9:38 ` Markus Armbruster
2015-01-13 12:47 ` Stefan Weil
0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2015-01-13 9:38 UTC (permalink / raw)
To: Zhang Min
Cc: lizhengui, fangyi.fangyi, hz.wangzhiwei, subo7, kathy.wangting,
qemu-devel, shiweixian, boby.chen, wangjie88, pbonzini, wu.wubin,
aliguori
Zhang Min <rudy.zhangmin@huawei.com> writes:
> From: Rudy Zhang <rudy.zhangmin@huawei.com>
>
> There are several tab characters in the 'vl.c' file. It leads to
> to misalignment of the code. So, let the space instead of the tab.
>
> Signed-off-by: Rudy Zhang <rudy.zhangmin@huawei.com>
While we don't want tabs in new code, we generally leave existing ones
alone until we need to touch the line anyway, or the tabs get in the way
somehow.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vl.c: optimized code format
2015-01-13 9:38 ` Markus Armbruster
@ 2015-01-13 12:47 ` Stefan Weil
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Weil @ 2015-01-13 12:47 UTC (permalink / raw)
To: Markus Armbruster, Zhang Min
Cc: lizhengui, fangyi.fangyi, hz.wangzhiwei, subo7, kathy.wangting,
qemu-devel, wu.wubin, boby.chen, wangjie88, pbonzini, shiweixian,
aliguori
Am 13.01.2015 um 10:38 schrieb Markus Armbruster:
> Zhang Min <rudy.zhangmin@huawei.com> writes:
>
>> From: Rudy Zhang <rudy.zhangmin@huawei.com>
>>
>> There are several tab characters in the 'vl.c' file. It leads to
>> to misalignment of the code. So, let the space instead of the tab.
>>
>> Signed-off-by: Rudy Zhang <rudy.zhangmin@huawei.com>
> While we don't want tabs in new code, we generally leave existing ones
> alone until we need to touch the line anyway, or the tabs get in the way
> somehow.
True. In this special case, there is already a similar patch queued for
qemu-trivial, so Zhang Min's patch is not needed. As far as I know, that
previous patch was sent to prepare further modifications in vl.c, that's
why I acked it.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-13 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13 5:18 [Qemu-devel] [PATCH] vl.c: optimized code format Zhang Min
2015-01-13 9:38 ` Markus Armbruster
2015-01-13 12:47 ` Stefan Weil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).