Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2558
b: refs/heads/master
c: 9769f4e
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy White authored and Linus Torvalds committed Jun 22, 2005
1 parent cce59f9 commit 65a1b20
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2966632a134e865db3c819346a1dc7d96e05309
refs/heads/master: 9769f4eb3fad2dd53a5d24c81ee5f7f05450742b
6 changes: 5 additions & 1 deletion trunk/Documentation/filesystems/isofs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ Mount options unique to the isofs filesystem.
mode=xxx Sets the permissions on files to xxx
nojoliet Ignore Joliet extensions if they are present.
norock Ignore Rock Ridge extensions if they are present.
unhide Show hidden files.
hide Completely strip hidden files from the file system.
showassoc Show files marked with the 'associated' bit
unhide Deprecated; showing hidden files is now default;
If given, it is a synonym for 'showassoc' which will
recreate previous unhide behavior
session=x Select number of session on multisession CD
sbsector=xxx Session begins from sector xxx

Expand Down
17 changes: 11 additions & 6 deletions trunk/fs/isofs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,17 @@ static int do_isofs_readdir(struct inode *inode, struct file *filp,

/* Handle everything else. Do name translation if there
is no Rock Ridge NM field. */
if (sbi->s_unhide == 'n') {
/* Do not report hidden or associated files */
if (de->flags[-sbi->s_high_sierra] & 5) {
filp->f_pos += de_len;
continue;
}

/*
* Do not report hidden files if so instructed, or associated
* files unless instructed to do so
*/
if ((sbi->s_hide == 'y' &&
(de->flags[-sbi->s_high_sierra] & 1)) ||
(sbi->s_showassoc =='n' &&
(de->flags[-sbi->s_high_sierra] & 4))) {
filp->f_pos += de_len;
continue;
}

map = 1;
Expand Down
19 changes: 14 additions & 5 deletions trunk/fs/isofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ struct iso9660_options{
char rock;
char joliet;
char cruft;
char unhide;
char hide;
char showassoc;
char nocompress;
unsigned char check;
unsigned int blocksize;
Expand Down Expand Up @@ -309,13 +310,15 @@ enum {
Opt_block, Opt_check_r, Opt_check_s, Opt_cruft, Opt_gid, Opt_ignore,
Opt_iocharset, Opt_map_a, Opt_map_n, Opt_map_o, Opt_mode, Opt_nojoliet,
Opt_norock, Opt_sb, Opt_session, Opt_uid, Opt_unhide, Opt_utf8, Opt_err,
Opt_nocompress,
Opt_nocompress, Opt_hide, Opt_showassoc,
};

static match_table_t tokens = {
{Opt_norock, "norock"},
{Opt_nojoliet, "nojoliet"},
{Opt_unhide, "unhide"},
{Opt_hide, "hide"},
{Opt_showassoc, "showassoc"},
{Opt_cruft, "cruft"},
{Opt_utf8, "utf8"},
{Opt_iocharset, "iocharset=%s"},
Expand Down Expand Up @@ -356,7 +359,8 @@ static int parse_options(char *options, struct iso9660_options *popt)
popt->rock = 'y';
popt->joliet = 'y';
popt->cruft = 'n';
popt->unhide = 'n';
popt->hide = 'n';
popt->showassoc = 'n';
popt->check = 'u'; /* unset */
popt->nocompress = 0;
popt->blocksize = 1024;
Expand Down Expand Up @@ -389,8 +393,12 @@ static int parse_options(char *options, struct iso9660_options *popt)
case Opt_nojoliet:
popt->joliet = 'n';
break;
case Opt_hide:
popt->hide = 'y';
break;
case Opt_unhide:
popt->unhide = 'y';
case Opt_showassoc:
popt->showassoc = 'y';
break;
case Opt_cruft:
popt->cruft = 'y';
Expand Down Expand Up @@ -784,7 +792,8 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
sbi->s_rock = (opt.rock == 'y' ? 2 : 0);
sbi->s_rock_offset = -1; /* initial offset, will guess until SP is found*/
sbi->s_cruft = opt.cruft;
sbi->s_unhide = opt.unhide;
sbi->s_hide = opt.hide;
sbi->s_showassoc = opt.showassoc;
sbi->s_uid = opt.uid;
sbi->s_gid = opt.gid;
sbi->s_utf8 = opt.utf8;
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/isofs/isofs.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ struct isofs_sb_info {
unsigned char s_nosuid;
unsigned char s_nodev;
unsigned char s_nocompress;
unsigned char s_hide;
unsigned char s_showassoc;

mode_t s_mode;
gid_t s_gid;
Expand Down
16 changes: 9 additions & 7 deletions trunk/fs/isofs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,28 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
}

/*
* Skip hidden or associated files unless unhide is set
* Skip hidden or associated files unless hide or showassoc,
* respectively, is set
*/
match = 0;
if (dlen > 0 &&
(!(de->flags[-sbi->s_high_sierra] & 5)
|| sbi->s_unhide == 'y'))
{
match = (isofs_cmp(dentry,dpnt,dlen) == 0);
(sbi->s_hide =='n' ||
(!(de->flags[-sbi->s_high_sierra] & 1))) &&
(sbi->s_showassoc =='y' ||
(!(de->flags[-sbi->s_high_sierra] & 4)))) {
match = (isofs_cmp(dentry, dpnt, dlen) == 0);
}
if (match) {
isofs_normalize_block_and_offset(de,
&block_saved,
&offset_saved);
*block_rv = block_saved;
*offset_rv = offset_saved;
if (bh) brelse(bh);
brelse(bh);
return 1;
}
}
if (bh) brelse(bh);
brelse(bh);
return 0;
}

Expand Down

0 comments on commit 65a1b20

Please sign in to comment.