Replaced some usages of ntfs_mbstoucs_libntfscompat with ntfs_mbstoucs.
Some calls to ntfs_mbstoucs_libntfscompat were unnecessary as they only used functionality that can be provided by ntfs_mbstoucs.edge.strict_endians
parent
8d06955ea4
commit
c3e651047a
|
@ -2149,7 +2149,7 @@ static int add_attr_vol_name(MFT_RECORD *m, const char *vol_name,
|
|||
int i;
|
||||
|
||||
if (vol_name) {
|
||||
uname_len = ntfs_mbstoucs_libntfscompat(vol_name, &uname, 0);
|
||||
uname_len = ntfs_mbstoucs(vol_name, &uname);
|
||||
if (uname_len < 0)
|
||||
return -errno;
|
||||
if (uname_len > 0xff) {
|
||||
|
|
|
@ -235,8 +235,8 @@ static int parse_options(int argc, char **argv)
|
|||
break;
|
||||
|
||||
case 'n':
|
||||
opts.attr_name_len = ntfs_mbstoucs_libntfscompat(optarg,
|
||||
&opts.attr_name, 0);
|
||||
opts.attr_name_len = ntfs_mbstoucs(optarg,
|
||||
&opts.attr_name);
|
||||
if (opts.attr_name_len < 0) {
|
||||
ntfs_log_perror("Invalid attribute name '%s'",
|
||||
optarg);
|
||||
|
|
|
@ -293,7 +293,7 @@ static ntfs_inode *ntfs_new_file(ntfs_inode *dir_ni,
|
|||
|
||||
/* ntfs_mbstoucs(...) will allocate memory for ufilename if it's NULL */
|
||||
ufilename = NULL;
|
||||
ufilename_len = ntfs_mbstoucs_libntfscompat(filename, &ufilename, 0);
|
||||
ufilename_len = ntfs_mbstoucs(filename, &ufilename);
|
||||
if (ufilename_len == -1) {
|
||||
ntfs_log_perror("ERROR: Failed to convert '%s' to unicode",
|
||||
filename);
|
||||
|
|
|
@ -257,7 +257,7 @@ static int change_label(ntfs_volume *vol, unsigned long mnt_flags, char *label,
|
|||
}
|
||||
}
|
||||
|
||||
label_len = ntfs_mbstoucs_libntfscompat(label, &new_label, 0);
|
||||
label_len = ntfs_mbstoucs(label, &new_label);
|
||||
if (label_len == -1) {
|
||||
ntfs_log_perror("Unable to convert label string to Unicode");
|
||||
return 1;
|
||||
|
|
|
@ -241,7 +241,7 @@ static void parse_options(int argc, char *argv[])
|
|||
s = argv[optind++];
|
||||
if (optind != argc) {
|
||||
/* Convert the string to little endian Unicode. */
|
||||
attr_name_len = ntfs_mbstoucs_libntfscompat(s, &attr_name, 0);
|
||||
attr_name_len = ntfs_mbstoucs(s, &attr_name);
|
||||
if ((int)attr_name_len < 0)
|
||||
err_exit("Invalid attribute name \"%s\": %s\n",
|
||||
s, strerror(errno));
|
||||
|
|
Loading…
Reference in New Issue