static struct super_block* sfs_get_super(struct file_system_type *fst, int flags,
const char *devname, void *data)
{
struct super_block *sb = 0;
struct mounter_data_t *mount_data = sfs_get_mounter_data(data);
HIGHPRINT("Calling get_sb_single\n");
sb = get_sb_single(fst, flags, mount_data, sfs_fill_super);
HIGHPRINT("Returned from get_sb_single\n");
dealloc_mounter_data(mount_data);
return sb;
}
####
/* Function: sfs_get_super(struct file_system_type *fst, int flags, const char *devname, void *data)
*
* Parameters:
* fst -
* flags -
* devname -
* data -
*
* Returns:
* struct super_block*
*/
static struct super_block* sfs_get_super(struct file_system_type *fst, int flags,
const char *devname, void *data)
{
struct super_block *sb = 0;
struct mounter_data_t *mount_data = sfs_get_mounter_data(data);
HIGHPRINT("Calling get_sb_single\n");
sb = get_sb_single(fst, flags, mount_data, sfs_fill_super);
HIGHPRINT("Returned from get_sb_single\n");
dealloc_mounter_data(mount_data);
return sb;
}
####
#!/usr/bin/perl
# Script to add comments for Natural Doc. http://www.naturaldoc.org
use Tie::File;
use strict;
use warnings;
use Data::Dumper;
my @FILE_ARRAY;
tie @FILE_ARRAY, 'Tie::File', "searchfs.c", recsep => "\n" or die $!;
my $found = 0;
foreach (@FILE_ARRAY) {
#if (/^(sub .+)/) {
# Match .c function
if (/^(?:([0-9_a-zA-Z*]+) +)?(?:([0-9_a-zA-Z*]+) +)?(?:([0-9_a-zA-Z*]+) +)?([0-9_a-zA-Z*]+)\((.+?)\)/) {
my ($a, $b, $c, $d, $e) = ("") x 5;
if (defined($1)) {
$a = $1;
}
if (defined($2)) {
$b = $2;
}
if (defined($3)) {
$c = $3;
}
if (defined($4)) {
$d = $4;
}
if (defined($5)) {
$e = $5;
}
print $a . " " . $b . " " . $c . " " . $d . " ARGS: " . $e . "\n";
}
}