misc: open() with O_CREAT requires a MODE argument.

This commit is contained in:
Solomon Peachy 2013-11-25 09:09:29 -05:00
parent 917ccc0851
commit 3d434dc96e
2 changed files with 6 additions and 6 deletions

View file

@ -162,10 +162,10 @@ static int kodak6800_get_tonecurve(struct kodak6800_ctx *ctx, char *fname)
/* Open file and write it out */
{
int tc_fd = open(fname, O_WRONLY|O_CREAT);
int tc_fd = open(fname, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR);
if (tc_fd < 0)
return -1;
for (i = 0 ; i < 768; i++) {
/* Byteswap appropriately */
data[i] = cpu_to_be16(le16_to_cpu(data[i]));
@ -604,7 +604,7 @@ skip_query:
/* Exported */
struct dyesub_backend kodak6800_backend = {
.name = "Kodak 6800/6850",
.version = "0.24",
.version = "0.25",
.uri_prefix = "kodak6800",
.cmdline_usage = kodak6800_cmdline,
.cmdline_arg = kodak6800_cmdline_arg,

View file

@ -1227,10 +1227,10 @@ static int get_tonecurve(struct shinkos2145_ctx *ctx, int type, char *fname)
/* Open file and write it out */
{
int tc_fd = open(fname, O_WRONLY|O_CREAT);
int tc_fd = open(fname, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR);
if (tc_fd < 0)
return -1;
for (i = 0 ; i < 768; i++) {
/* Byteswap appropriately */
curves[i] = cpu_to_be16(le16_to_cpu(curves[i]));
@ -1660,7 +1660,7 @@ static int shinkos2145_query_serno(struct libusb_device_handle *dev, uint8_t end
struct dyesub_backend shinkos2145_backend = {
.name = "Shinko/Sinfonia CHC-S2145 (S2)",
.version = "0.22",
.version = "0.23",
.uri_prefix = "shinkos2145",
.cmdline_usage = shinkos2145_cmdline,
.cmdline_arg = shinkos2145_cmdline_arg,