Mercurial > vim
comparison src/os_unix.c @ 7778:4e09a38129a3 v7.4.1186
commit https://github.com/vim/vim/commit/4a1314cb9c1847dc32ceeb3eebeae123ef10b16e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 27 20:47:18 2016 +0100
patch 7.4.1186
Problem: Error messages for security context are hard to translate.
Solution: Use one string with %s. (Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 27 Jan 2016 21:00:05 +0100 |
parents | 6069f43cea4e |
children | 0b6c37dd858d |
comparison
equal
deleted
inserted
replaced
7777:3f2d25636986 | 7778:4e09a38129a3 |
---|---|
2820 { | 2820 { |
2821 /* copy the attribute value of buffer */ | 2821 /* copy the attribute value of buffer */ |
2822 ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0); | 2822 ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0); |
2823 if (ret < 0) | 2823 if (ret < 0) |
2824 { | 2824 { |
2825 MSG_PUTS(_("Could not set security context ")); | 2825 vim_snprintf((char *)IObuff, IOSIZE, |
2826 MSG_PUTS(name); | 2826 _("Could not set security context %s for %s"), |
2827 MSG_PUTS(_(" for ")); | 2827 name, to_file); |
2828 msg_outtrans(to_file); | 2828 msg_outtrans(IObuff); |
2829 msg_putchar('\n'); | 2829 msg_putchar('\n'); |
2830 } | 2830 } |
2831 } | 2831 } |
2832 else | 2832 else |
2833 { | 2833 { |
2840 return; /* leave because it isn't usefull to continue */ | 2840 return; /* leave because it isn't usefull to continue */ |
2841 | 2841 |
2842 case ERANGE: | 2842 case ERANGE: |
2843 default: | 2843 default: |
2844 /* no enough size OR unexpected error */ | 2844 /* no enough size OR unexpected error */ |
2845 MSG_PUTS(_("Could not get security context ")); | 2845 vim_snprintf((char *)IObuff, IOSIZE, |
2846 MSG_PUTS(name); | 2846 _("Could not get security context %s for %s. Removing it!"), |
2847 MSG_PUTS(_(" for ")); | 2847 name, from_file); |
2848 msg_outtrans(from_file); | 2848 msg_puts(IObuff); |
2849 MSG_PUTS(_(". Removing it!\n")); | 2849 msg_putchar('\n'); |
2850 /* FALLTHROUGH to remove the attribute */ | 2850 /* FALLTHROUGH to remove the attribute */ |
2851 | 2851 |
2852 case ENODATA: | 2852 case ENODATA: |
2853 /* no attribute of this name */ | 2853 /* no attribute of this name */ |
2854 ret = removexattr((char*)to_file, name); | 2854 ret = removexattr((char*)to_file, name); |