[syslinux] [PATCH 001/001] Add UFS1/2 support to Extlinux installer.

Matt Fleming matt at console-pimps.org
Fri Jul 19 08:48:11 PDT 2013


On Fri, 12 Jul, at 08:31:27PM, Raphael S.Carvalho wrote:
> @@ -575,7 +594,7 @@ bail:
>      return 1;
>  }
>  
> -/* btrfs has to install the ldlinux.sys in the first 64K blank area, which
> +/* btrfs/ufs2 has to install the ldlinux.sys in the first 64K blank area, which
>     is not managered by btrfs tree, so actually this is not installed as files.
>     since the cow feature of btrfs will move the ldlinux.sys every where */
>  int btrfs_install_file(const char *path, int devfd, struct stat *rst)

The ufs2 portion of this could do with more explanation, since the btrfs
reasons don't apply to ufs2, right (ufs2 has no cow feature)?

> @@ -955,9 +974,10 @@ static char * get_default_subvol(char * rootdir, char * subvol)
>  
>  static int install_file(const char *path, int devfd, struct stat *rst)
>  {
> -    if (fs_type == EXT2 || fs_type == VFAT || fs_type == NTFS)
> +    if (fs_type == EXT2 || fs_type == VFAT || fs_type == NTFS
> +	|| fs_type == UFS1)
>  	return ext2_fat_install_file(path, devfd, rst);
> -    else if (fs_type == BTRFS)
> +    else if (fs_type == BTRFS || fs_type == UFS2)
>  	return btrfs_install_file(path, devfd, rst);
>      else if (fs_type == XFS)
>  	return xfs_install_file(path, devfd, rst);
> @@ -983,7 +1003,7 @@ static int validate_device(const char *path, int devfd)
>      struct statfs sfs;
>      int pfd;
>      int rv = -1;
> -    
> +
>      pfd = open(path, O_RDONLY|O_DIRECTORY);
>      if (pfd < 0)
>  	goto err;
> @@ -1063,6 +1083,17 @@ static const char *find_device(const char *mtab_file, dev_t dev)
>  		done = true;
>  		break;
>  	    }
> +
> +	    break;
> +	case UFS1:
> +	case UFS2:
> +	    if (!strcmp(mnt->mnt_type, "ufs") && !stat(mnt->mnt_fsname, &dst) &&
> +		dst.st_rdev == dev) {
> +		done = true;
> +		break;

Don't need this break statement.

-- 
Matt Fleming, Intel Open Source Technology Center


More information about the Syslinux mailing list