Skip to content

Commit

Permalink
feat(main): update AZURE_NVME_ -> AZURE_DISK_
Browse files Browse the repository at this point in the history
Lost these changes during previous udev rule updates to generalize
for SCSI support which caused some expected links to be dropped.

Signed-off-by: Chris Patterson <[email protected]>
  • Loading branch information
cjp256 committed Aug 19, 2024
1 parent 6f01277 commit 2c88497
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions doc/azure-nvme-id.8
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Parse device identifiers for udev consumption:
.IP
.EX
$ sudo env DEVNAME=/dev/nvme1n1 azure\-nvme\-id \-\-udev
AZURE_NVME_VS=type=local,index=1,name=nvme\-110G\-1
AZURE_NVME_TYPE=local
AZURE_NVME_INDEX=1
AZURE_NVME_NAME=nvme\-110G\-1
AZURE_DISK_VS=type=local,index=1,name=nvme\-110G\-1
AZURE_DISK_TYPE=local
AZURE_DISK_INDEX=1
AZURE_DISK_NAME=nvme\-110G\-1
.EE
.PP
Check \f[CR]azure\-nvme\-id\f[R] version:
Expand Down
8 changes: 4 additions & 4 deletions doc/azure-nvme-id.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ Parse device identifiers for udev consumption:

```bash
$ sudo env DEVNAME=/dev/nvme1n1 azure-nvme-id --udev
AZURE_NVME_VS=type=local,index=1,name=nvme-110G-1
AZURE_NVME_TYPE=local
AZURE_NVME_INDEX=1
AZURE_NVME_NAME=nvme-110G-1
AZURE_DISK_VS=type=local,index=1,name=nvme-110G-1
AZURE_DISK_TYPE=local
AZURE_DISK_INDEX=1
AZURE_DISK_NAME=nvme-110G-1
```

Check `azure-nvme-id` version:
Expand Down
18 changes: 9 additions & 9 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ int enumerate_azure_nvme_controllers()
*/
void print_udev_key_value(const char *key, const char *value)
{
printf("AZURE_NVME_");
printf("AZURE_DISK_");
while (*key)
{
putchar(toupper((unsigned char)*key));
Expand All @@ -333,9 +333,9 @@ void print_udev_key_value(const char *key, const char *value)
* type=local,index=2,name=nvme-600G-2
*
* Environment variables printed include:
* AZURE_NVME_TYPE=local
* AZURE_NVME_INDEX=2
* AZURE_NVME_NAME=nvme-600G-2
* AZURE_DISK_TYPE=local
* AZURE_DISK_INDEX=2
* AZURE_DISK_NAME=nvme-600G-2
*/
int parse_vs_for_udev_import(char *vs)
{
Expand Down Expand Up @@ -367,10 +367,10 @@ int parse_vs_for_udev_import(char *vs)
/**
* Execute udev mode, printing out environment variables for import.
*
* AZURE_NVME_VS: <vendor specific data>
* AZURE_NVME_TYPE: <type, if specified>
* AZURE_NVME_INDEX: <index for data disk, if specified>
* AZURE_NVME_NAME: <name for disk, if specified>
* AZURE_DISK_VS: <vendor specific data>
* AZURE_DISK_TYPE: <type, if specified>
* AZURE_DISK_INDEX: <index for data disk, if specified>
* AZURE_DISK_NAME: <name for disk, if specified>
* etc...
*/
int execute_udev_import(void)
Expand All @@ -389,7 +389,7 @@ int execute_udev_import(void)
return 1;
}

printf("AZURE_NVME_VS=%s\n", vs);
printf("AZURE_DISK_VS=%s\n", vs);
parse_vs_for_udev_import(vs);
free(vs);

Expand Down

0 comments on commit 2c88497

Please sign in to comment.