Re: [PATCH 1/4] xfs_restore: refactor open-coded file creation code

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

 



On Fri, Feb 22, 08:47, Darrick J. Wong wrote
> +	ret = ioctl(fd, XFS_IOC_RESVSP64, &fl);
> +	if (ret && errno != ENOTTY)
> +		mlog(MLOG_VERBOSE | MLOG_NOTE,
> +_("attempt to reserve %lld bytes for %s using %s failed: %s (%d)\n"),
> +				size, pathname, "XFS_IOC_RESVSP64",
> +				strerror(errno), errno);

The "XFS_IOC_RESVSP64" string literal can be included in the format string.

> +	if (ret == 0)
> +		goto done;
> +
> +done:

LOL

> +	return fd;

If you really want to return success even if the ioctl() failed, this might
deserve a comment.

Andre
-- 
Max Planck Institute for Developmental Biology
Max-Planck-Ring 5, 72076 Tübingen, Germany. Phone: (+49) 7071 601 829
http://people.tuebingen.mpg.de/maan/

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux