Strenghtened types in ntfslabel and ntfsfix

edge.strict_endians
Jean-Pierre André 2011-03-23 09:27:33 +01:00
parent 6d68c74f37
commit 4b408e60ae
2 changed files with 5 additions and 5 deletions

View File

@ -213,8 +213,8 @@ static int OLD_ntfs_volume_set_flags(ntfs_volume *vol, const le16 flags)
"context.\n");
goto err_exit;
}
if (ntfs_attr_lookup(AT_VOLUME_INFORMATION, AT_UNNAMED, 0, 0, 0, NULL,
0, ctx)) {
if (ntfs_attr_lookup(AT_VOLUME_INFORMATION, AT_UNNAMED, 0,
CASE_SENSITIVE, 0, NULL, 0, ctx)) {
ntfs_log_error("Attribute $VOLUME_INFORMATION was not found in "
"$Volume!\n");
goto err_out;

View File

@ -298,8 +298,8 @@ static int change_label(ntfs_volume *vol, unsigned long mnt_flags, char *label,
ntfs_log_perror("Failed to get attribute search context");
goto err_out;
}
if (ntfs_attr_lookup(AT_VOLUME_NAME, AT_UNNAMED, 0, 0, 0, NULL, 0,
ctx)) {
if (ntfs_attr_lookup(AT_VOLUME_NAME, AT_UNNAMED, 0, CASE_SENSITIVE,
0, NULL, 0, ctx)) {
if (errno != ENOENT) {
ntfs_log_perror("Lookup of $VOLUME_NAME attribute failed");
goto err_out;
@ -325,7 +325,7 @@ static int change_label(ntfs_volume *vol, unsigned long mnt_flags, char *label,
"allowed. Truncating excess characters.\n",
(unsigned)(0x100 / sizeof(ntfschar)));
label_len = 0x100;
new_label[label_len / sizeof(ntfschar)] = 0;
new_label[label_len / sizeof(ntfschar)] = const_cpu_to_le16(0);
}
if (a) {
if (resize_resident_attribute_value(ctx->mrec, a, label_len)) {