Skip to content

Commit 5b88a57

Browse files
committed
Updated for vfs.on_mount signature change.
1 parent 4f779e6 commit 5b88a57

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

linuxcnc.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
static on_vfs_mount_ptr on_vfs_mount;
3838

39-
static void load_tools (const char *path, const vfs_t *fs)
39+
static void load_tools (const char *path, const vfs_t *fs, vfs_st_mode_t mode)
4040
{
4141
// NOTE: must match layout of material_t
4242
static const char params[] = "PIERCE_HEIGHT,PIERCE_DELAY,CUT_SPEED,CUT_HEIGHT,CUT_VOLTS,PAUSE_AT_END,KERF_WIDTH,CUT_AMPS,GAS_PRESSURE,CUT_MODE,PUDDLE_JUMP_HEIGHT,PUDDLE_JUMP_DELAY,-,NAME,THC";
@@ -92,6 +92,10 @@ static void load_tools (const char *path, const vfs_t *fs)
9292

9393
switch((p = strlookup(strtok(buf, " "), params, ','))) {
9494

95+
case -1:
96+
status = Status_GcodeUnsupportedCommand;
97+
break;
98+
9599
case 13:
96100
strncpy(material.name, eq, sizeof(material.name) - 1);
97101
material.name[sizeof(material.name) - 1] = '\0';
@@ -122,7 +126,7 @@ static void load_tools (const char *path, const vfs_t *fs)
122126
}
123127

124128
if(on_vfs_mount)
125-
on_vfs_mount(path, fs);
129+
on_vfs_mount(path, fs, mode);
126130
}
127131

128132
void linuxcnc_init (void)

sheetcam.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
static on_vfs_mount_ptr on_vfs_mount;
3838

39-
static void load_tools (const char *path, const vfs_t *fs)
39+
static void load_tools (const char *path, const vfs_t *fs, vfs_st_mode_t mode)
4040
{
4141
static const char params[] = "Pierce\\ height,Pierce\\ delay,Feed\\ rate,Cut\\ height,cv,Pause\\ at\\ end\\ of\\ cut,Kerf\\ width,ca,gp,cm,jh,jd,Tool\\ number,Name,th"; // NOTE: must match layout of material_t
4242

@@ -59,6 +59,7 @@ static void load_tools (const char *path, const vfs_t *fs)
5959
if(status == Status_OK && plasma_material_is_valid(&material))
6060
plasma_material_add(&material, true);
6161

62+
material.id = -1;
6263
*material.name = '\0';
6364
status = Status_GcodeUnusedWords;
6465

@@ -75,6 +76,9 @@ static void load_tools (const char *path, const vfs_t *fs)
7576

7677
switch((p = strlookup(buf, params, ','))) {
7778

79+
case -1:
80+
break;
81+
7882
case 12:
7983
{
8084
uint32_t id;
@@ -113,7 +117,7 @@ static void load_tools (const char *path, const vfs_t *fs)
113117
}
114118

115119
if(on_vfs_mount)
116-
on_vfs_mount(path, fs);
120+
on_vfs_mount(path, fs, mode);
117121
}
118122

119123
void sheetcam_init (void)

0 commit comments

Comments
 (0)