← Commit list

f0305b7f7

Paul Fox
Paul Fox
2006-03-28
SOURCE BUG Duration: 8s

Subject

fix behavior of ZZ, with respect to readonly mode(s). original patch and report from Alexander Griesser.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/vi.c+6 -5
@@ -3617,12 +3617,13 @@ key_cmd_mode:
indicate_error(c);
break;
}
- if (file_modified
+ if (file_modified) {
#ifdef CONFIG_FEATURE_VI_READONLY
- && ! vi_readonly
- && ! readonly
-#endif /* CONFIG_FEATURE_VI_READONLY */
- ) {
+ if (vi_readonly || readonly) {
+ psbs("\"%s\" File is read only", cfn);
+ break;
+ }
+#endif /* CONFIG_FEATURE_VI_READONLY */
cnt = file_write(cfn, text, end - 1);
if (cnt < 0) {
if (cnt == -1)