X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhfs%2Fsuper.c;h=c773aa763bda84bd5cf3f7163465a659c74b31ab;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=345651903fe0068144101ebabea6adcad2f79603;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 345651903..c773aa763 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -152,8 +152,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) hsb->s_gid = current->gid; hsb->s_file_umask = 0644; hsb->s_dir_umask = 0755; - hsb->s_type = 0x3f3f3f3f; /* == '????' */ - hsb->s_creator = 0x3f3f3f3f; /* == '????' */ + hsb->s_type = hsb->s_creator = cpu_to_be32(0x3f3f3f3f); /* == '????' */ hsb->s_quiet = 0; hsb->part = -1; hsb->session = -1; @@ -216,11 +215,11 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) } else if (!strcmp(this_char, "type") && value) { if (strlen(value) != 4) return 0; - hsb->s_type = *(u32 *)value; + memcpy(&hsb->s_type, value, 4); } else if (!strcmp(this_char, "creator") && value) { if (strlen(value) != 4) return 0; - hsb->s_creator = *(u32 *)value; + memcpy(&hsb->s_creator, value, 4); /* Boolean-valued options */ } else if (!strcmp(this_char, "quiet")) { if (value)