Re: [PATCH] btrfs-progs: canonicalize pathnames for device commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 04, 2014 at 04:43:11PM -0400, Jeff Mahoney wrote:
> --- a/utils.c
> +++ b/utils.c
> @@ -987,6 +987,63 @@ static int blk_file_in_dev_list(struct b
>  }
>  
>  /*
> + * Resolve a pathname to a device mapper node to /dev/mapper/<name>
> + * Returns NULL on invalid input or malloc failure; Other failures
> + * will be handled by the caller using the input pathame.
> + */
> +char *canonicalize_dm_name(const char *ptname)
> +{
> +	FILE	*f;
> +	size_t	sz;
> +	char	path[256], name[256], *res = NULL;

FYI, I've changed this to PATH_MAX
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux