Skip to content

Commit

Permalink
Force notification functions to end in the same way (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik authored and lguohan committed Mar 17, 2017
1 parent b816443 commit afdccde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -1188,9 +1188,9 @@ typedef enum _sai_switch_attr_t
/**
* @brief Set Switch shutdown notification callback function passed to the adapter.
*
* Use sai_switch_shutdown_request_fn as notification function.
* Use sai_switch_shutdown_request_notification_fn as notification function.
*
* @type sai_pointer_t sai_switch_shutdown_request_fn
* @type sai_pointer_t sai_switch_shutdown_request_notification_fn
* @flags CREATE_AND_SET
* @default NULL
*/
Expand Down Expand Up @@ -1399,7 +1399,7 @@ typedef enum _sai_switch_attr_t
*
* @param[in] switch_id Switch Id
*/
typedef void (*sai_switch_shutdown_request_fn)(
typedef void (*sai_switch_shutdown_request_notification_fn)(
_In_ sai_object_id_t switch_id);

/**
Expand Down
9 changes: 8 additions & 1 deletion meta/parse.pl
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,15 @@ sub ProcessTagType
return $val;
}

if ($val =~/^sai_pointer_t sai_\w+_fn$/)
if ($val =~/^sai_pointer_t (sai_\w+_fn)$/)
{
my $pointerfn = $1;

if (not $pointerfn =~ /^sai_\w+_(callback|notification)_fn$/)
{
LogWarning "function name $pointerfn should be in format sai_\\w+_(callback|notification)_fn";
}

return $val;
}

Expand Down

0 comments on commit afdccde

Please sign in to comment.