Repository navigation
Commit ceb7f32
committed
kconfig: do not accept a directory for configuration output
Currently, conf_write() can be called with a directory name instead
of a file name. As far as I see, this can happen for menuconfig,
nconfig, gconfig.
If it is given with a directory path, conf_write() kindly appends
getenv("KCONFIG_CONFIG"), but this ends up with hacky dir/basename
handling, and screwed up in corner-cases like "what if KCONFIG_CONFIG
is an absolute path?" as discussed before:
https://patchwork.kernel.org/patch/9910037/
Since conf_write() is already messed up, I'd say "do not do it".
Please pass a file path all the time. If a directory path is specified
for the configuration output, conf_write() will simply error out.
Now that the tmp file is created in the same directory as the .config,
the previously reported "what if KCONFIG_CONFIG points to a different
file system?" has been solved.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Nicolas Porcel <nicolasporcel06@gmail.com>1 parent 65be755 commit ceb7f32
1 file changed
Lines changed: 24 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
821 | 820 | | |
822 | | - | |
| 821 | + | |
823 | 822 | | |
824 | 823 | | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
847 | 837 | | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
| 838 | + | |
852 | 839 | | |
853 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
854 | 845 | | |
855 | 846 | | |
856 | 847 | | |
| |||
897 | 888 | | |
898 | 889 | | |
899 | 890 | | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
904 | 894 | | |
905 | 895 | | |
906 | 896 | | |
907 | | - | |
| 897 | + | |
908 | 898 | | |
909 | 899 | | |
910 | 900 | | |
| |||
0 commit comments