Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC_FAT_VIEW Add config supprt #3236

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

kasjer
Copy link
Contributor

@kasjer kasjer commented May 29, 2024

Code adds CONFIG.TXT file to FAT view.
File contains values available via conf API

@kasjer kasjer force-pushed the kasjer/msc_fat_view-config-with-write branch 3 times, most recently from d34dd41 to 62701dd Compare May 29, 2024 14:18
kasjer added 2 commits May 29, 2024 16:20
This update msc_fat_view so:
- statically added entries (link tables) can be hidden
  if valid() tells to hide
- there was only one handler that could take care of
  writes to unallocated disk area. Now several can be
  used (image write, config write, possible U2C)
Update handler in separate file, code
was part of msc_fat_view.c
@kasjer kasjer force-pushed the kasjer/msc_fat_view-config-with-write branch from 62701dd to e835c9f Compare May 29, 2024 14:20
};

static void
config_text_export(char *name, char *val)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick could be constified

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function prototype matches typedef from config/config.h

/**
 * Called per-configuration variable being exported.
 *
 * @param name The name of the variable to export
 * @param val  The value of the variable to export
 */
typedef void (*conf_export_func_t)(char *name, char *val);```

{
int name_len = strlen(name);
int val_len = 0;
if (val) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@kasjer kasjer mentioned this pull request Jun 1, 2024
Code allows to write back configuration.

Signed-off-by: Jerzy Kasenberg <[email protected]>
@kasjer kasjer force-pushed the kasjer/msc_fat_view-config-with-write branch from e835c9f to b15c3a6 Compare June 6, 2024 06:15
@kasjer kasjer merged commit 3ea5f71 into apache:master Jun 7, 2024
17 checks passed
@kasjer kasjer deleted the kasjer/msc_fat_view-config-with-write branch June 7, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants